This repo tests if AI4G models can be deployed using the EcoAssist workflow. In classify.py
you can find a minimal reproducable example. Feel free to test by cloning the repo and PR with adjustments.
- loop through the MegaDetector output JSON to find where the animals are
- crop out each animal and feed it to the classifier
- add its predictions to the existing JSON
- Link to code: At the moment the prediction returns only the highest class. Would it be possible to get all classes with their confidences? Perhaps we can add an extra argument like
return_all_predictions
tosingle_image_classification()
?
- It is assumed you have a conda environment called
pytorch-wildlife
.conda create -n pytorch-wildlife python=3.8 -y conda activate pytorch-wildlife pip install PytorchWildlife
- You have downloaded the model file from Zenodo and placed it in the repo folder: https://zenodo.org/records/10042023/files/AI4GAmazonClassification_v0.0.0.ckpt?download=1
- Execute script:
conda activate pytorch-wildlife && python "pytorch-wildlife-test-run\classify.py"