Giter Club home page Giter Club logo

pix2model's People

Contributors

akiwa avatar dependabot[bot] avatar erlerphilipp avatar ertz10 avatar fsteinschorn avatar joeyeschner avatar joschi1212 avatar robertunf avatar sophie-sudoku avatar thefloff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pix2model's Issues

New Dev Environment

New develop environment without certificates and custom port which is reachable inside the TU Netz,

Abort Job (API Endpunkt und FE button)

send_stop_job_command responds with an job-not-found exception, which is due to a different naming scheme for the jobs compared to the folders that are created for a job (i think)

Save UID in URL

Currently, user get this message after starting a job:
image

When they close the tab, the UID is gone for good and the job wastes resources. Here are a few ideas to prevent this:

  1. Write explicitly that users should keep the link / UID saved somewhere.
  2. Open the UID-link so that it is stored in the browser history.
  3. Switch directly to the editor and wait for the results to show up.

I would prefer a combination of 2. and 3. (1. would be obsolete). But this requires:

  • The editor must always be available, or at least a simpler version.
  • The editor needs to differentiate between "file not found" and "in progress". The "in progress" should be more visible then.

Submit images while submitting images

You can click on the drop area to upload more images while the upload of one job runs. However, the additional images are not enqueued with the other ones. If you click again on submit, the second ones are submitted to a another job.

Looks like it works but it's a strange mixup of separate jobs. Also, only one result link is show. The easiest and best solution is probably to disable additional file drops while the upload runs.

WP 1.1: Basic SFM

"Programmiere einen Prozess, der

  • n Fotos (als PNG, JPEG, NPY etc.) bekommt
  • Structure-From-Motion darauf anwendet und
  • eine Punktwolke erzeugt. PW als npy array speichern.
    Die genutzte Variante von SFM soll schnell zu implementieren sein, vorhandene Bibliotheken checken, wie z.B. OpenCV. Lizenz checken!
    Etwas Recherche und mit Stefan absprechen, welche Variante gut geeignet ist."

WP 1.4: Basic Webservice

"Programmiere einen Webservice

  • mit minimalem Web-Interface
  • Upload für Fotos (Datenmenge limitieren, um DOS zu verhindern)
  • Lasse die Fotos durch die Pipeline (1.1-1.3) laufen
  • Gefärbtes Mesh zum Download anbieten
  • Webservice Set-up dokumentieren, damit alle im Team testen können
  • Überlastung verhindern durch z.B. eine einfache Warteliste
    Checke Django, Heroku, (Nvidia) Docker"

Enable removal of selected images

Add a small delete button in the upload area on each image so they can be removed before uploading without re-selecting all images.
image

WP 3.3: Microservices

Server umbauen, damit die einzelnen Pipeline-Schritte getrennt laufen können. Z.B. je ein Microservice (Docker-Container) pro Schritt. Warteschlange mit Schätzung der Wartezeit. Mehrere Prozesse gleichzeitig erlauben, aber nur 1 Rekonstruktion pro Grafikkarte. Upload von Punktwolken erlauben (SFM überspringen). Fortschritt und Position in Wartenschlange auf Website anzeigen.

Improved Pipeline

In the default pipeline with our test data (100 images), most of the computation time is spent with Meshing and Texturing. We can expect a significant speed-up by replacing some of the steps, roughly 25 min -> 10min. Also, there are newer methods available that should improve the quality.

This will be the improved pipeline:

Step Node Type Duration Critical for Duration Critical for Quality Comment
1 Camera Init 1s      
1 Feature Extraction 1m + ++  
1 Image Matching 1s      
1 Feature Matching 2m ++ +  
1 Structure from Motion 4m ++++ +++  
1 Prepare Dense Scene 20s      
1 Depth Map 20s   +  
1 Depth Map Filter 15s   +  
  Editor     +++  
2 SfM Transform 10s?      
2 Normal Estimation 1m? + + Hemisphere normals from camera poses
2 Meshing 2m ++ ++ PPSurf
2 Mesh Filtering 30s     Mesh decimation (quadric?)
2 UV Unwrap 2m? ++ + By Meshlab?
2 Texturing 3m? +++ ++ Use Uvs from previous step

Changes are only in Step 2 (after editor):

  1. Normal Estimation (low priority): The new meshing can easily be extended to use rough normals. AliceVision likely doesn't output a point cloud with normals. We can make them ourselves from the camera poses. The hemisphere is known and will help the reconstruction a lot.
  2. Meshing: Use POCO or similar. Retrain with the P2S ABC var-noise dataset. Add data augmentation (outliers, scene-based). Fix POCO bugs (marching cubes indexing, global layer ignored, kd-tree workers).
  3. Mesh Filtering: Since we're not working with AliceVision's Tetrahedral reconstruction anymore, we need a different filtering method. The best choice is probably Quadric Mesh Simplification (PyMeshlab).
  4. UV Unwrap (low priority): AliceVision's Meshing includes an unwrapping step, which is quite slow and produces inefficient textures. An alternative could be an automatic unwrapping by PyMeshlab or Blender. AliceVision's Texturing node can stay but the parameters must be set so that it uses the existing UV coordinates.

Default Meshroom Pipeline

Implement the default Meshroom Pipeline with only minor changes. Minor changes mean the editor must still work and some parameters should be changed.

AliceVision binaries need to be called like from Meshroom. This will require adapting the lib path before the CLI calls:
cmdBase = '**export LD_LIBRARY_PATH**=$LD_LIBRARY_PATH:{}/aliceVision/lib'.format(absComputePath) + ' && {}/aliceVision/bin/aliceVision_convertSfMFormat'.format(absComputePath)

Adapting the default pipeline to the editor:

  • Transforms can be applied to the data with a SfM Transform node.
  • The handling of the cropping area in the editor needs to change. The meshing node has a parameter for a custom bounding box, which needs to come from the editor. If none is provided, the meshing will find its own.

Requires Meshroom Docker #162

Read this: https://sketchfab.com/blogs/community/tutorial-meshroom-for-beginners/

Here are some rough measurements and parameter suggestions:

Step Node Type Duration Critical for Duration Critical for Quality Parameters
1 Camera Init 1s      
1 Feature Extraction 1m + ++ describer quality high, force CPU? check issues
1 Image Matching 1s     method?, advanced settings -> min for voc tree, sequential neighbors; max descriptors 0, Nb matches 0
1 Feature Matching 2m ++ + cascade hashing l2; guided matching, cross matching, known poses geometric error max 0
1 Structure from Motion 4m ++++ +++ Scaling on
1 Prepare Dense Scene 20s     no save meta data?
1 Depth Map 20s   + downscale 1? (longer meshing)
1 Depth Map Filter 15s   + number of nearest cameras 10 -> 15?
  Editor   +++ +++ Need to switch from cropping area to will-be-reconstructed area
2 SfM Transform 10s?     Apply Editor transformations (check if non-uniform scaling is supported)
2 Meshing 7m +++++++ ++ use custom bounding box from editor; min step 1, margin init (final) coef 1; densify front/back 5
2 Mesh Filtering 30s      
2 Texturing 9m ++++++++++ ++ padding, multiband high freq > low freq, subdiv target ration 1

Sequential upload of images

Upload images one after the other to avoid multi-processing overhead? Is this a relevant issue for the server?

Check and resolve deploy warnings

  1. pix2model-backend-1 | [2023-08-01T14:43:57Z][INFO] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  2. babel-preset-react-app is part of the create-react-app project, which is not maintianed anymore. It is thus unlikely that this bug will ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies to work around this error. This will make this message go away.
  3. material ui outdated

Link for issues

add a link to this repo's issues to the website so that users can notify us when the server is broken.

maybe next to privacy/impressum?

Readme update

Clarify:

  • is ssh_key in secrets really the public key?
  • have both workflows in both branches?
  • check in deploy script? vars file?
  • point by default to deploy.sh instead of start.sh
  • single command in readme to create default env file with contents?
  • extend certificate section

@akiwa please comment on these ideas / questions

Multi-threaded Poisson Rec

There is a new release of PyMeshlab: cnr-isti-vclab/meshlab#1218

possibility to select number of threads in filter screened poisson

@thefloff Is this worth a try? Was it single threaded before or used all available cores?

Be careful with the update, they apparently changed the filter names.

Accessibility Statement

WP 3.4: Server Security

DOS verhindern, indem häufige IP-Addressen blockiert werden. Admin-Zugang, um einzelne Prozesse beenden zu können und Parameter (z.B. Größen-Limits und Grid-Resolution) für einzelne Nutzer ändern zu können. Login mit temporären Login-Daten. Login-Daten und alle anderen Daten auf Knopfdruck sofort von Server löschen, sonst nach 1 Tag. Auf Wunsch Email senden, wenn das Ergebnis bereit zum Download ist. Server-Telemetrie und Email, wenn der Server nicht mehr erreichbar ist (status-checker Prozess auf anderen CG Server?).

WP 1.2: Basic Reconstruction

"Programmiere einen Prozess, der

  • eine Punktwolke (als NPY, LAS etc.) bekommt
  • Screened Poisson Surface Reconstruction (PyMeshlab) darauf anwendet
  • ein Mesh erzeugt. Mesh als STL oder PLY speichern.
    Lizenz von PyMeshLab checken!"

Automatic CI deploy of main and develop branches

We want to test changes on the server using the latest commit of the develop branch.

This is partially implemented but not ready yet. A key problem is dealing with two different servers on separate GPUs but they need to share parts of the system.

WP 5.4: Frontend Editor

"Basic editing von Punktwolke und/oder Mesh:

  • cropping, verschieben, skalieren, rotieren, zurücksetzen
  • in Web-Interface using WebGL
  • Bounding-Box längen anzeigen"

Check skipping MVS

Possible speed-up with minor quality impact -> low priority

Check if this is even necessary. MVS in AliceVision (Prepare Dense Scene, Depth Map, Depth Map Filter) doesn't take very long with ~1min.

Meshing should be faster too, which could make it more relevant. AliceVision's Meshing will be impacted a lot by using only the sparse point cloud. So we should do this only after switching to our own meshing.

WP 3.2: P2S Integration

"Oberflächenrekonstruktion durch Points2Surf ersetzen.
Kleinere Änderungen sind nötig:

  • Punktwolke vor Verarbeitung auf -0.5…+0.5 skalieren
  • das erzeugte Mesh auf die ursprüngliche Größe der Punktwolke skalieren
  • sehr große Punkwolken vorher down-samplen auf ca. 50k Punkte
  • Grid-resolution für besser Geschwindigkeit optimieren
  • Neu trainieren mit ABC+Famous+Thingi10k datasets?"

WP 2: Usability Test 1

"Wenn der Server im Testbetrieb mit den einfachen Algorithmen läuft, erste Tests mit Bekannten und Verwandten machen.
Klären, ob die Ergebnisse die Erwartungen erfüllen und warum. Tests mit verschiedenen Mengen von Fotos, verschiedene Qualität, Lichtverhältnisse, Objekte etc. Richtlinien für nötige Anzahl Fotos suchen. Gefundene Probleme entweder gleich beheben oder in den Workplan eintragen.
Kontakt zu Künstlern, Museen etc. herstellen und testen lassen.

Zwischenbericht schreiben und 2. Rate beantragen

WP 3.1: Better SFM

"Genauere Recherche zusammen mit Stefan, um die beste Variante von SFM für die in den Tests gefundenen Bedingungen auszuwählen.
Implementierungsaufwand abwägen.
Implementieren, evtl. in C++, sonst wahrscheinlich in Python."

CI interruptions

Minimize interruptions caused by CI deploying a new commit.
Best idea so far: make CI wait until the tasks queue is done.
Open problem: this will take a while if the server is busy.

WP 5.2: better colors

"Nearest Neighbor Vertex Colors (NNVC) ist sehr einfach und wird bei kleineren Grid-Resolutions schlechte Ergebnisse liefern. Mit Philipp, Stefan und/oder Michi absprechen, wie man das verbessern kann. Mögliche Lösungen:

  • Sub-division des Meshes und dann NNVC
  • automatisches UV-Mapping und Erzeugung von Texturen aus den Punktwolken.
  • Texturen aus den Fotos?"
  • Paper: "Texture Defragmentation for Photo-Reconstructed 3D Models" will come to Meshlab
  • Interessantes Paper: "Point2color: 3D Point Cloud Colorization Using a Conditional Generative
    Network and Differentiable Rendering for Airborne LiDAR"

WP 1.3: Basic Coloring

"Programmiere einen Prozess, der

  • eine Punktwolke (als NPY, LAS etc.) bekommt
  • ein Mesh (als STL oder PLY) bekommt
  • für jeden Vertex im Mesh den nächsten Punkt in der Punktwolke sucht
  • die Farbe vom Punkt zum Vertex überträgt und
  • das gefärbte Mesh speichert.
    Nearest-neighbor search mit spatial acceleration structure, z.B. scipy.ckdtree."

Upload error

Got the same error for all uploaded images:
image

Any idea what the reason might be?
Display error without HTML tags?

WP 5.3: Web-Renderer

"Hochgeladene Fotos anzeigen, Punktwolken und Meshes (mit WebGL) anzeigen.
Extra Viewer, mit dem man bereits runtergeladene Meshes anzeigen kann."

Error Message for too large images

There is currently an ugly error message in the upload field for images that are too large. A specific human readable error message should be implemented.

Image for reference
YCMYZLr

Editor cursor position

I moved browser tab with active editor from one screen to another. The gizmo doesn't match the cursor position anymore.
Seems like some cursor offset is not updated. DPI scaling and different resolutions might play a role.

WP 1.5: Server Hardware

"Zusammen mit den Technikern des CG Instituts die Hardware besprechen. Ca. Ryzen 7, 2 x RTX 3070, 64 GB RAM.
Domain für den Webservice absprechen und von den Technikern einrichten lassen. Es wird vielleicht eine Sub-Domain wie
images2mesh.cg.tuwien.ac.at
Bei Lieferschwierigkeiten evtl. einen alten Rechner temporär verwenden.
SSH-Zugang für Projektmitarbeiter?"

WP 5.1: P2S optimization

  • Points2Surf ist relativ langsam. Mit iterativem Verfeinern wie MISE in Occupancy Networks müsste es schneller und genauer werden.
  • Grid auf Bounding Box limitieren.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.