-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Unexpectedly large trained model size (~200 MB .pt and ~400 MB .onnx) #2183
Comments
👋 Hello @Shassk, thank you for your interest in YOLOv3 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results. RequirementsPython>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started: git clone https://github.com/ultralytics/yolov3 # clone
cd yolov3
pip install -r requirements.txt # install EnvironmentsYOLOv3 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv3 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv3 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit. Introducing YOLOv8 🚀We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 🚀! Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects. Check out our YOLOv8 Docs for details and get started with: pip install ultralytics |
@Shassk hello! Thanks for reaching out with your observations. The size discrepancy you're seeing in the YOLOv3 ONNX model compared to v5 and v8 is indeed unusual. Here are a few things to consider:
If you've ensured all the above and the issue persists, it might be worth looking into the specifics of how the ONNX model is being saved. Sometimes, additional metadata or training information can bloat the file size. For further assistance, please refer to our documentation or consider opening an issue with detailed information about your training configuration and export process. We're here to help! 😊 |
It's not so much about export size as it is about primary trained model size in |
@Shassk apologies for the confusion, and thank you for your patience. A 200 MB
If these checks don't reveal any issues, please do open a new issue with the details of your training setup, and we'll take a closer look to help resolve this. Your feedback is invaluable in improving the tools we provide to the community. 🌟 |
Search before asking
Question
Hi! So when trying to figure out performance differences and prediction quality between v5 and v8 I've decided to try v3 on which we've trained out first set of models.
And the results were... confusing to put it lightly.
With default 640x640 size set manually (to be sure) the size of models exported to ONNX were:
And the performance drop during training was huge as well, I had to set batch to 16 to barely fit into Nvidia T4 15 GB of VRAM comparing to ~11 GB with batch 56 with v5.
The code and the dataset (images of cars, 1 class
car
) used to all 3 was the same aside fromyolo_version
,yolo_type
setting variables set in the previous cell (Google Colab notebook):Our previous v3 models were trained using Darknet and them in a Python script parsed into weights for ONNX model.
The models were turning out quite a bit larger than v5/v8 at around 33.1-33.4 MB, but I was not expecting to see a size difference this big.
Which is really unfortunate since your version allows for smoother and easier train/export process.
So what can cause this? Is there a solution? Maybe there some additional setting should be done?
Additional
No response
The text was updated successfully, but these errors were encountered: