This repository contains all code of our 2025 CVPR FGVC paper, including:
- PECL (Paired Embeddings Contrastive Loss) implementation in
scripts/paired_embeddings_models.py
. - Torch dataloader for the S2BMS dataset in
scripts/DataSetImagePresence.py
- Resnet-based model to predict species presence vectors from satellite images, using PECL.
- Use conda to install packages using
pecl.yml
or pip install fromrequirements.txt
. - Add your user profile data paths in
content/data_paths_pecl.json
. (This step is not needed when just experimenting with the code and the example data provided in the repo).
- A sample data set (of 16 locations) is provided in
tests/data_tests/
. - Go to
notebooks/Getting started.ipynb
to see examples of how to load the data and model.
- The full S2-BMS data set is available on Zenodo.
- Our Torch dataloader is available in
scripts/DataSetImagePresence.py
.
- For details please see our paper.
- PyTorch implementation can be found in
scripts/paired_embeddings_models.py
(ImageEncoder.pecl_loss()
).
- The training scripts used for the paper are
scripts/train.py
andscripts/train_randomsearch.py
. - The figures and tables in the paper were created in
notebooks/Results figs and tables.ipynb
.
Please cite our paper if you use this method or data in a publication - thank you!!