Comments (8)
yolov3 uses 'steps' policy to adjust the learning rate. At the end of the training lr = 0.00001
, so it should converge with this learning rate using SGD. Why did you try to use the polynomial policy?
from yolov3.
Ohhhhh. I read about the polynomial lr curve in the v2 paper, I thought it was carried over to v3. I'll implement the steps policy from the cfg file instead.
But something is odd. I thought yolov3 was trained to 160 epochs, but maybe not. It looks like in yolov3.cfg batch = 16
(batch_size I think), and max_batches = 500200
. trainvalno5k.txt has 117264 images in it, or 117264 / 16 = 7329
batches/epoch. 500200 / 7329 = 68
epochs. Do you think this means yolov3 is fully trained in 68 epochs?
from yolov3.
Could you point out where have the authors specified the epoch number in yolov3 paper (or somewhere else)? I might have missed that.
from yolov3.
Section 3 of the yolov2 paper (aka yolo "9000") has many training details. v3 paper is completely missing details though, this is why everyone is so confused translating it to pytorch. I think I finally found the right loss function to use though, my latest commit can continue training at lr = 1e-5
without performance losses I think. I haven't tested a full epoch yet but the first ~2000 batches show stable P and R values. The main change I made was to merge the obj
and noobj
confidence loss terms. I think you or @ydixon might have recommended the same change a few days ago. I'm hoping this is the missing link.
https://pjreddie.com/media/files/papers/YOLO9000.pdf
"Training for classification. We train the network on the standard ImageNet 1000 class classification dataset for 160 epochs using stochastic gradient descent with a starting learning rate of 0.1, polynomial rate decay with a power of 4, weight decay of 0.0005 and momentum of 0.9 using the Darknet neural network framework [13]."
from yolov3.
Ah I forgot to mention, in the spirit on this issue, I've implemented the correct yolov3 step lr policy now. This assumes 68 total epochs, and 0.1 lr drops at 80% and 90% completion, just like the cfg.
Lines 106 to 114 in 7416c18
from yolov3.
Ahh, they probably did not use the same training config in yolov3. I hope the training converges with the new loss term. Btw, you referenced the training of the classification network, not the detection network. The detection training in yolo2 should be
We train the network for 160 epochs with a starting learning rate of 10−3, dividing it by 10 at 60 and 90 epochs. We use a weight decay of 0.0005 and momentum of 0.9. We use a similar data augmentation to YOLO and SSD with random crops, color shifting, etc. We use the same training strategy on COCO and VOC.
from yolov3.
It seems good to schedule the learning rate with the total number of epochs. You probably already know that but the darknet schedules the learning rate with the total number of batches processed during the training. I am not sure which one is the better practice, although both methods will give the same result for the standard .cfg file.
from yolov3.
@okanlv yes darknet tracks total batches, with 16 images per batch. I tracked the epochs instead. There's probably not much effect one way or the other.
from yolov3.
Related Issues (20)
- mAP comparison between Pre-trained model & trained model (coco2017) HOT 3
- Regarding the training environment HOT 3
- hello HOT 2
- About the instructions and code comments HOT 3
- A hopelessly long try to replicate the YOLOv3 kernel HOT 2
- Change in the anchor boxes HOT 10
- ❗️Closed per Code of Conduct HOT 1
- no anchor_grid in V9.6.0 yolov3.pt HOT 5
- Convert YOLOv3 dataset format to YOLOv8 HOT 3
- What's the difference between it and Yolov3 by Joseph Redmon ? HOT 7
- Integrating YOLOv8 into YOLOv3 Ultralytics HOT 2
- Seeking Advice on Equivalent YOLOv5 Variant to Standard YOLOv3 HOT 1
- Unexpectedly large trained model size (~200 MB .pt and ~400 MB .onnx) HOT 4
- Training requires much more VRAM than v5/v8 and results in ~200 MB models comparing to <15 MB models of v5/v8 HOT 5
- how to train your yolov8?
- Need info regarding yolov3-tiny anchors, dataset creation and loss function. HOT 5
- Cannot compute loss function from best model HOT 1
- yolov3_ros input topic channel problem HOT 5
- Issue with training YOLOv3-tiny from scratch HOT 4
- yolov3.pt HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov3.