mapbox / robosat

Semantic segmentation on aerial and satellite imagery. Extracts features such as: buildings, parking lots, roads, water, clouds
MIT License
2.02k stars 382 forks source link

Prediction crash on empty tile file #142

Closed NickStallman closed 4 years ago

NickStallman commented 5 years ago

Hi Guys

This should be a simple one.

It looks like rs download grabbed a zero byte tile from my source, which then caused rs predict to crash when it hit the zero byte file. Deleting the file and re-running the prediction started at the start again.

So this could be improved three ways:

  1. rs download shouldn't ever save a blank file.
  2. rs predict shouldn't error out if it hits an invalid file, gracefully output an error then continue is potentially the better response. If stopping prediction is desired then it's important point 3 is done.
  3. rs predict shouldn't predict already predicted tiles. If the user desires a clean prediction from scratch then the output folder should be empty.

Thanks

daniel-j-h commented 5 years ago
  1. If you want to add more checks they have to go here
  2. Prediction uses a dataloader with a custom dataset here; this dataset comes from here. Adding error handling to the dataset is a bit ugly since it is not built to shrink or grow on demand.
  3. This got started in https://github.com/mapbox/robosat/pull/132 but never finished.

Overall I would love to push the responsibility more onto the user and the dataset preparation code. If prediction fails the dataset is not in a good shape which should be a precondition we require to hold.

daniel-j-h commented 4 years ago

Not actionable on our end. Please re-open if you have more to add.