microsoft / CameraTraps

PyTorch Wildlife: a Collaborative Deep Learning Framework for Conservation.
https://cameratraps.readthedocs.io/en/latest/
MIT License
752 stars 238 forks source link

State of the data_management folder #318

Closed VLucet closed 1 year ago

VLucet commented 1 year ago

I had a quick question about the data_management folder. A few of the scripts at the root in that folder mention that they are "example code" and "YMMV". Are those scripts outdated?

agentmorris commented 1 year ago

Two scripts are definitely tagged as useful-but-unfinished...

Let us know if there are other specific scripts you have questions about.

-Dan

VLucet commented 1 year ago

Thanks, I needed an MD to COCO converter to deploy the MD predictions into label studio, so when I saw the tags in md_to_coco_starter_code I took from it to wrapped the code into a simple cli tool and can confirm there isn't much to change to make it work well. My next step was to look into converting MD results into csv to quantify the number of triggers (and their confidence) over a dataset and later compare with labelled data. So, what about cct_to_csv.py?

agentmorris commented 1 year ago

Re: MD to COCO...

Glad the code was a useful starting point! At some point I'll clean it up and test it, but for now, I'll add a comment to the header pointing to your repo.

Re: cct_to_csv...

This will work as advertised, but there's not a One True CSV format, so the output format is a little arbitrary. Rows are:

 relative_path,datetime,location,sequence_id,class_name

Note that this script COCO Camera Traps files (primarily data available on LILA) to .csv. If you want to convert MegaDetector output to .csv (again, the format will be a little arbitrary by definition), you can use convert_output_format.py.

VLucet commented 1 year ago

Thanks for pointing out this scripts in the batch processing section, I had not seen it