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

MegaDetector v6 Model Weights for YOLOv8/YOLOv9/YOLOv11 Fine-Tuning #550

Open
1 task done
ChaimElchik opened this issue Dec 24, 2024 · 8 comments
Open
1 task done
Labels
question Further information is requested

Comments

@ChaimElchik
Copy link

Search before asking

  • I have searched the Pytorch-Wildlife issues and found no similar bug report.

Question

Hi everyone,

I’m working on a project that involves fine-tuning models for animal detection and tracking in drone-shot videos. So far, I’ve been using YOLOv8 and YOLOv11 with COCO dataset weights as a base, followed by fine-tuning with my custom data.

I’d like to explore using MegaDetector v6 model weights as a base model for fine-tuning and training instead, given its specialized focus on wildlife detection. However, I haven’t found a straightforward way to download these weights in a format compatible with YOLO frameworks like YOLOv8, YOLOv9, or YOLOv11.

My questions are:

  1. Is it possible to access the MegaDetector v6 model weights in a format that can be converted or directly used for fine-tuning with YOLO frameworks? So a model.pt file that's usable in the YOLO frame works.

  2. Are there any guidelines or tools available for converting the MegaDetector v6 weights into a YOLO-compatible format?

  3. If not, is there a recommended pipeline or alternative for using MegaDetector’s capabilities in a YOLO-based workflow?

Any help, suggestions, or resources would be greatly appreciated!

Thank you in advance for your guidance!

Additional

No response

@ChaimElchik ChaimElchik added the question Further information is requested label Dec 24, 2024
@jackedney
Copy link

@ChaimElchik
Copy link
Author

https://zenodo.org/records/14567879

I have looked at the model weights here but have not seen the YOLOv11 versions yet only v10 as most recent. MDV6-yolov10n.pt

When can we expect a yolov11n or yolov11x

@reinhrst
Copy link

reinhrst commented Jan 24, 2025

It seems now that YOLOv11 versions will not be released

Image

On discord @zhmiao explained:

we discarded v11 because the gain from this model is limited.

Still having said this, I wonder if the Zenodo repository is indeed the "official" repo? It would be great if the weights are downloadable somewhere (I'm sure we could get to them by reverse engineering them from PyTorch Wildlife, but its hardly in the spirit of open source if this turns out to be the only way....

@jackedney
Copy link

It seems now that YOLOv11 versions will not be released
Image

On discord @zhmiao explained:

we discarded v11 because the gain from this model is limited.

Still having said this, I wonder if the Zenodo repository is indeed the "official" repo? It would be great if the weights are downloadable somewhere (I'm sure we could get to them by reverse engineering them from PyTorch Wildlife, but its hardly in the spirit of open source if this turns out to be the only way....

The Zenodo repository is where the weights are downloaded from in the repo, so it must be the official source

@danielaruizl1
Copy link
Collaborator

@ChaimElchik, thank you for your question. In our latest release, you will find a new fine-tuning module that could be very helpful for your project. We offer compact and extra versions of YOLOv9 and YOLOv10. However, we did not upload the weights for YOLOv11 because we did not observe an improvement in performance, as detailed in our Model Zoo table.

If you believe that YOLOv11's weights would be useful, please let us know, and we could consider uploading them. As mentioned by @jackedney, the Zenodo repository is the official source for the weights, and you can download them yourself. However, our fine-tuning code will automatically handle this for you.

We hope this information helps!

@ChaimElchik
Copy link
Author

@danielaruizl1 Thank you for responding. I have managed to train the model in the same way I have trained baseline coco yolov11 models. I did notice that when training it over 150 epochs on my own data the generalization of megadetector goes away. I compared my fine tuned version with the original on totally different data from what the fine tuning is like and noticed a rather large decrease in detections when compared to the fine tuned version signaling the los of generalization by fine tuning sadly.

@zhmiao
Copy link
Collaborator

zhmiao commented Jan 24, 2025

Hello @ChaimElchik , could you elaborate on how you set up the comparisons a little more? You have a baseline model using yolov11 trained on coco on your own data, and which megadetector are you using for the comparison?

@ChaimElchik
Copy link
Author

@zhmiao

I downloaded the MegaDetector weights for yolov10x. I trained it on aerial data of elephants to improve its performance on aerial data. Then ran in on aerial data of Buffalos. The baseline model was also ran on the Buffalo data and elephant data. The fine tuned model performed beter on the elephant data as expected as it was trained on a subset of it. The fine tuned model however performed worse on the Buffalo data then the baseline model. My guess being that it lost some of its generalization due to possible overfitting on the elephant data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants