agentmorris / MegaDetector

MegaDetector is an AI model that helps conservation folks spend less time doing boring things with camera trap images.
MIT License
116 stars 24 forks source link

Include date/time as part of convert_output_format.py #111

Closed aweaver1fandm closed 1 year ago

aweaver1fandm commented 1 year ago

As part of issue https://github.com/agentmorris/MegaDetector/issues/89 the image date/time information can now be captured when the detector is run. Is possible to modify convert_output_format.py in order to include that information if it exists. For example, our researcher converts the .json file .csv for analysis with R. He uses that date/time information as part of his processing but it doesn't get included as of now as part of the conversion.

agentmorris commented 1 year ago

Done. When the fields "height", "width", "datetime", or "exif_metadata" are present in the .json file, corresponding fields will appear in the .csv file. Let me know if that works for you. This also helped me find another minor bug where results failed to save correctly from run_detector_batch.py when using --include_exif_metadata when lens parameters (which are represented in a complicated way) were present in EXIF.

Closing because I'm 99% sure this does what you need, but feel free to re-open if I missed something.

Thanks!

aweaver1fandm commented 1 year ago

Just tested and the date/time is now in the .csv file. Thanks