microsoft / aerial_wildlife_detection

Tools for detecting wildlife in aerial images using active learning
MIT License
230 stars 58 forks source link

Cannot iterate over empty image table #35

Closed frafra closed 3 years ago

frafra commented 3 years ago

https://github.com/microsoft/aerial_wildlife_detection/blob/de150d03e267676876554f62188689cf4196f4bb/projectCreation/import_images.py#L83

This code cannot handle an empty image table. Here is a quick fix:

 imgs_existing = set([i['filename'] for i in imgs_existing or []])
bkellenb commented 3 years ago

Thank you! I have resolved the issue; I decided to make the code a bit more explicit and added an if/else for readability.