Open devedse opened 4 years ago
i have the same problem
Is someone tracking these issues?
@ersheng-ai ,@Tianxiaomo , @KelvinCPChiu , could you maybe chip in?
Is someone tracking these issues?
@ersheng-ai ,@Tianxiaomo , @KelvinCPChiu , could you maybe chip in?
If you are using Cfg.use_darknet_cfg = True, you should try this solution https://github.com/Tianxiaomo/pytorch-YOLOv4/issues/138#issuecomment-721116468.
Did you find any solution to this? I also try to train with a custom dataset. I tried both with CFG.use_darknet_cfg = True and False. No matter what I do I get AP = 0.000 in evaluation after one EPOC of 5000 images. And my loss is in the thousands.
Nope, still waiting...
i have the same problem,and my initial loss is 200,000,In addition, although Loss has been decreasing, it was still at 12,000 in 140 epoch,The convergence rate is quite slow,And I found that the losses were just focused on the regression losses,So I think there may be some problems with the calculation of loss
hello, did you solve this problem ? i have trained for hundreds epoch, AR and AR are almost zero when evaluate the model. but when i test single image using models.py, refer to https://github.com/Tianxiaomo/pytorch-YOLOv4/issues/413#issuecomment-817089815. could you give me some advice? please thank you
Nope I've given up
Nope,I've given up.
maybe this: In the function : Yolo_loss.build_target(), the label mismach the pred, one is offset value, one is not
I had the same problem.
What work for me, is using Darknet again with:
cfg.use_darknet = True
and loading your last weights using pytorch default method: load_state_dict
not the method provided with the class (i think it should be deleted)
so you have to edit the train.py script.
I have the same problem, have anyone solved?
I have the same problem, have anyone solved?
Hi, I have also the same problem with my custom dataset, after training for 300 epochs the AP is zero and when running inference with the obtained model I cannot detect anything even in the train set. Any idea?
I just abandoned this repo all together and used the original darknet yolov4 instead. Got it to work much quicker and better.
I changed the learning rate and batch size, it works~
---Original--- From: @.> Date: Thu, Feb 24, 2022 19:17 PM To: @.>; Cc: @.**@.>; Subject: Re: [Tianxiaomo/pytorch-YOLOv4] I trained a model for 50 epochs but the AP was still 0.002 (#323)
Hi, I have also the same problem with my custom dataset, after training for 300 epochs the AP is zero and when running inference with the obtained model I cannot detect anything even in the train set. Any idea?
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
@Pigdrum For example, what kind of change did you make?
@devedse
When using Cfg.use_darknet_cfg = True
, the number of filters must be modified to (5+class)*3 in case of Yolov3
When debugging, iou=0 keeps coming out of bbox loss. I think there's an issue in anchor code or between custom data and anchor box size don't match.
I have the same problem, have anyone solved?
Candidate groups are well drawn between gt and anchor, but nothing matches (iou>0) between pred and anchor. There seems to be a problem with the model output.
Hey guys, I think the reason for AP or AR is quite low might be caused by the inappropriate Cfg.burn_in in cfg.py.
Hey guys, I think the reason for AP or AR is quite low might be caused by the inappropriate Cfg.burn_in in cfg.py.
- When I use the default Cfg.burn_in=1000 as Tianxiaomo did and train on coins dataset, the AP and AR is extra small. Later I notice the lr curve and find the lr is some kind like e-7 magnitude growing but very slow, which I guess may further leads to the same extremely slow updating of model weights, resulting in small AP and AR but high loss even after hundreds of epochs.
- Then I boldly change Cfg.burn_in=1, set -l 0.001 and epoch=100, it turns out my guess is right (at least it works for me, and i hope it also works for you :D!!!) NOTES: At first I just run for around 20 epochs, the metrics are still extra small. So I decide try running more epochs to see what will happen (at least it won't hurt, why don't give it a shot hahhhhh), and the result begins to seem reasonable.
Can you show us what format your train.txt has
Introduction
For a personal project I'd like to detect cars, busses, trucks and their license plates. To accomplish this I wanted to train a custom model using YoloV4 with this repository.
I followed the guidance described on this page: https://github.com/Tianxiaomo/pytorch-YOLOv4/blob/master/Use_yolov4_to_train_your_own_data.md
Based on this I've created a
train.txt
andval.txt
file with the following content:train.txt (255 lines)
val.txt (64 lines)
When we look at the first image, it's tagged as follows:
There's 4 cars tagged and 1 license plate.
Preparation
To start the actual training process I first changed some values in
cfg.py
:I copied the
val.txt
file topytorch-YOLOv4\data\val.txt
.Training
After this I ran the following command:
After 50 epochs though, the results and AP where still really low (also there seems to be a logging error, I haven't looked into that):
When I tried to use the model on an image the results also came out strange:
Also if we look at the TensorBoard we see the same issues:
I'm not sure what I'm missing, but for some reason it seems the model is not training
More investigation
I also tried with
Cfg.use_darknet_cfg = True
andCfg.classes = 4
, however when I do this I keep getting the following error: