Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DINOv2Reg4 + PlantCLEF2024 #2293

Merged
merged 8 commits into from
Jun 29, 2024
Merged

Conversation

v-espitalier
Copy link
Contributor

This commit adds the DINOv2Reg4 model as well as an example to use it.
The weights come from the contest PlantCLEF2024.

This pull request follows the emitted issue from monday evening : #2287

See:
(model specs from meta) https://arxiv.org/abs/2309.16588
(model weights PC24) https://zenodo.org/records/10848263
(PlantCLEF2024 contest) https://huggingface.co/spaces/BVRA/PlantCLEF2024

Thanks for your time,
Regards,
Vincent.

Copy link
Collaborator

@LaurentMazare LaurentMazare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this up, we try to keep the repo size on the small side so you could you remove the image and the species_id_mapping.txt files and instead add to the example readme the wget instructions to download them?
Otherwise looks fairly good.

})
}

/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove the commented code? We try to have as little as possible otherwise it quickly gets out of sync with the rest.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Laurent for your comments. I updated the files following your suggestions. Please tell me if the code requires additional modifications. Regards,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great thanks, would you mind running rustfmt as well as clippy, both seem to broke in the CI at the moment.

@v-espitalier
Copy link
Contributor Author

I just ran clippy an rustfmt. I think the code is fine now. Please don't hesitate to tell me otherwise.

@LaurentMazare
Copy link
Collaborator

Thanks!

@LaurentMazare LaurentMazare merged commit e27aac0 into huggingface:main Jun 29, 2024
10 checks passed
@v-espitalier
Copy link
Contributor Author

Thank you for adding my code. Regards,

EricLBuehler pushed a commit to EricLBuehler/candle that referenced this pull request Jun 29, 2024
* Add: DINOv2Reg4 with PlantCLEF2024 weights and example ( See https://arxiv.org/abs/2309.16588 and https://zenodo.org/records/10848263 )

* Remove extra files + update README to download them + remove extra lines

* minor fix (README remove extra spaces)

* minor fix (README: Fix image url)

* Modif: Add back interpolate_pos_encoding() + fix when no interpolation + remove extra comments + Update README ( source image changed and so the predictions )

* Fix: Improve code lisibility with '$ cargo clippy' and '$ cargo fmt'

* Another clippy fix.

---------

Co-authored-by: x-VEspit <[email protected]>
Co-authored-by: laurent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants