Giter Club home page Giter Club logo

Comments (8)

github-actions avatar github-actions commented on May 1, 2024

Hello @h030162, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note that Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

from yolov5.

glenn-jocher avatar glenn-jocher commented on May 1, 2024

@h030162 can you supply code to reproduce your error please?

from yolov5.

glenn-jocher avatar glenn-jocher commented on May 1, 2024

@h030162 I just tested this on our colab notebook, and everything works correctly. You can load up an 80 class model with pretrained weights if you are training on coco, or you can change the class count of your model and dataset as well. The only requirement is that the dataset and model class counts must match each other:

Dataset:

yolov5/data/coco128.yaml

Lines 14 to 15 in ad71d2d

# number of classes
nc: 80

Model:

# parameters
nc: 80 # number of classes

If you change nc, everything still works correctly. In this case the model will be composed of pretrained weights except for the output layers, which are no longer the same shape as the pretrained output layers. The output layers will remain initialized by random weights.

from yolov5.

h030162 avatar h030162 commented on May 1, 2024

./yolov5_checkpoint/yolov5_models/yolov5x.pt is not compatible with ./models/yolov5x.yaml. Specify --weights '' or specify a --cfg compatible with ./yolov5_checkpoint/yolov5_models/yolov5x.pt.

I just change yolov5x.yaml nc from 80 to 2. and change yaml file in data .nc from 80 to2. names:["dog", "cat"]

from yolov5.

glenn-jocher avatar glenn-jocher commented on May 1, 2024

@h030162 I tested this again (a second time) in colab, and everything is still working fine. I updated yolov5x.yaml and coco128.yaml to 160 classes (duplicated the names to reach 160 names), and started training with the following command, all is correct with no problems.

python train.py --img 640 --batch 16 --epochs 5 --data ./data/coco128.yaml --cfg ./models/yolov5x.yaml --weights yolov5x.pt

See https://docs.ultralytics.com/yolov5/tutorials/train_custom_data

from yolov5.

ou525 avatar ou525 commented on May 1, 2024

@glenn-jocher I also have this problem

from yolov5.

glenn-jocher avatar glenn-jocher commented on May 1, 2024

@ou525 if this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

from yolov5.

github-actions avatar github-actions commented on May 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from yolov5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.