Git Product home page Git Product logo

Comments (4)

AlexeyAB avatar AlexeyAB commented on September 14, 2024

@anas-899 Yes, should be in .cfg:
output= (5 x 2 + C) x S x S
classes= C
side= S

  1. In my fork in yolo.c, CLASSNUM should be not less than classes, everything else in source code is automatically set
  2. use only jpeg and jpg format for training
  3. train at least 1000 batches
  4. for training use pretrained conv-model: http://pjreddie.com/media/files/extraction.conv.weights

If you get NAN when you training, or when you are trying to continue training from checkpoint: https://groups.google.com/forum/#!searchin/darknet/NAN|sort:relevance/darknet/-5DRax1SS2w/aDjRl15HEAAJ

  • reduce the learning rate(e.g. 1/10 of the origin), this can help (learning_rate= in .cfg file)
  • try to train on Linux (where the problem occurs much less frequently) by using https://github.com/pjreddie/darknet and then use already trained .weights for this fork yolo-windows

from yolo-windows.

anas-899 avatar anas-899 commented on September 14, 2024

@AlexeyAB
Thanks a lot for your fast replay.
Actually I tried everything but the training on windows is not giving any correct .weight file
I tried to train the data and same example of : http://guanghan.info/blog/en/my-works/train-yolo/
but actually the output weight file didn't detect anything

I think the only way to success is by training over Linux

from yolo-windows.

anas-899 avatar anas-899 commented on September 14, 2024

I solved the saving weight issue.
It needs to change in two positions:
first:
src/parser.c
you should change the line
FILE *fp = fopen(filename, "w");
to
FILE *fp = fopen(filename, "wb");

second:
src/utils.c
you should change the line
if(c==' '||c=='\t'||c=='\n') ++offset;
to
if(c==' '||c=='\t'||c=='\n'||c=='\r') ++offset;

then the training on windows will save the weight correctly.

from yolo-windows.

AlexeyAB avatar AlexeyAB commented on September 14, 2024

@anas-899 Thank you! I added this fix to rep.

from yolo-windows.

Related Issues (13)

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.