ErlerPhilipp / Pix2Model

Photogrammetry for everyone!

Home Page:https://pix2model.cg.tuwien.ac.at/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean-up COLMAP exception handling

ErlerPhilipp opened this issue · comments

Since the recent update of our COLMAP image, the processing steps throw messages and warnings as exceptions for some reason.

TODO:

  1. Investigate. All COLMAP steps? Other steps too? Maybe wrong CMD parameter?
  2. If possible, find a separation between real and wrong exception. Log wrong ones and catcch real ones.

COLMAP apparently writes everything to one stream. Even if I use "--log_to_stderr 1" in the commands, it writes everything to one stream. Oddly, in the "execute_subprocess", the stdout PIPE stays empty, while stderr PIPE has every log and error in it.
I don't think it's possible to steer the output unless COLMAP makes an update.

As of now, "raise" statements are commented out, and logs (as well as errors) are written to "log.txt".
One thing we could probably do is to catch "FileNotFound" exceptions and similar, since I think they are the only exceptions that occur when we have an insufficient amount of input pictures for COLMAP. (As can occur in the Model conversion to TXT and PLY stage)

seems we can find real errors with a regex. error lines start wie an e followed by 4 digits, e.g. e0123. if we copy those lines to the error log, we know if errors happened. we should offer the whole log to for more context.