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

Do not predict a file if the output already exists #132

Closed amandasaurus closed 5 years ago

amandasaurus commented 5 years ago

This change makes rs predict not do any predictions if the resultant output file already exists. Sometimes when playing around, I'll run rs predict, then stop it. If I run it again, it'll redo predictions it's already done. With this change, you're not redoing work.

daniel-j-h commented 5 years ago

I think we have to be careful with any automatic behavior change we introduce here. I can see this confusing users when they e.g. predict with one model and then predict again with a different model - but the output files don't change.

Instead it's probably a better idea to let the user handle the slippy map directory e.g. with the rs subset command if you want to quickly test on a smaller slippy map directory for example.

daniel-j-h commented 5 years ago

I think we have to be careful with any automatic behavior change we introduce here. I can see this confusing users when they e.g. predict with one model and then predict again with a different model - but the output files don't change.

Instead it's probably a better idea to let the user handle the slippy map directory e.g. with the rs subset command if you want to quickly test on a smaller slippy map directory for example.

daniel-j-h commented 5 years ago

I think we have to be careful with any automatic behavior change we introduce here. I can see this confusing users when they e.g. predict with one model and then predict again with a different model - but the output files don't change.

Instead it's probably a better idea to let the user handle the slippy map directory e.g. with the rs subset command if you want to quickly test on a smaller slippy map directory for example.

daniel-j-h commented 5 years ago

I think we have to be careful with any automatic behavior change we introduce here. I can see this confusing users when they e.g. predict with one model and then predict again with a different model - but the output files don't change.

Instead it's probably a better idea to let the user handle the slippy map directory e.g. with the rs subset command if you want to quickly test on a smaller slippy map directory for example.

daniel-j-h commented 5 years ago

I think we have to be careful with any automatic behavior change we introduce here. I can see this confusing users when they e.g. predict with one model and then predict again with a different model - but the output files don't change.

Instead it's probably a better idea to let the user handle the slippy map directory e.g. with the rs subset command if you want to quickly test on a smaller slippy map directory for example.

amandasaurus commented 5 years ago

Would keeping the existing behaviour and adding a "--skip-existing" flag be better? Then the current behaviour doesn't change, but users have an option.

On 22/10/2018 10:14, Daniel J. H. wrote:

I think we have to be careful with any automatic behavior change we introduce here. I can see this confusing users when they e.g. predict with one model and then predict again with a different model - but the output files don't change.

Instead it's probably a better idea to let the user handle the slippy map directory e.g. with the |rs subset| command if you want to quickly test on a smaller slippy map directory for example.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mapbox/robosat/pull/132#issuecomment-431765012, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAGC0cvALKB_iQ2E-ql9PdlNj2Aat-4ks5unX5tgaJpZM4XyYm3.

daniel-j-h commented 5 years ago

Yes that sounds like a good idea. We already have a --resume flag in train

https://github.com/mapbox/robosat/blob/5277aeb53966f6371bb359c91fdca35ae97dc3c4/robosat/tools/train.py#L50

want to add a flag to predict then we are consistent.

You will also need to run flake8 and black - check the travis config for how to do this.

daniel-j-h commented 5 years ago

I think this is stale by now.