-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
No ouput boxes after training !! #80
Comments
I see you are doing YOLOv2. How much is the loss? I suspect yours has not converged. |
@thtrieu Hi! I also train a two class YOLO v2 on my dataset, which has around 50000 images. I use the same setting as @KamelBouyacoub , and I trained with the pre-trained imagenet weights download from darknet website. At first, the loss decrease rapidly in around 10 epoches, then it stays around 1.8 ~ 2 and didn't decrease any more, the learning rate at 1e-6 for those epoches. I wonder how long it usually takes to converge? what's a normal loss like can give meaningful output? Could you kindly give some reasons or improvement suggestions? Thx! |
If you want to work with 2 labels, then there are two modifications have to be made in Make sure you did the above, then please avoid training right away. First, train on a very small dataset (3~5 images) of both classes. Only when you successfully overfit this small dataset (an inexpensive end-to-end test for the whole system), then move on to training on your whole dataset. If overfitting fails, I'll help you look into the details. |
@thtrieu Hi! I'm another poster with similar issues as mentioned in previous posts. I already change my class number to 2 classes and try to overfit the net with around 8 images, the loss can converge a bit lower but then it still get stuck around 1.6. I wonder these 3-5 images you mentioned is randomly drawn or there is any guidelines? Moreover, the loss of successful overfitting is around 0? Or any magnitude to indicate successful overfitting? I have been trapped for a few days and thanks in advance for your reply!! |
In my experiments, the overfitting loss can be around or smaller than 3-5 images can be anything (randomly drawn from training set is possible), but preferably contains all of your classes (e.g. car and dogs, then 3-5 images should better have both of them instead of only one). Not being able to overfit such a small training set means the learning rate are too big; or there is bug in the code. I recommend disabling noise augmentation during this overfit step by setting argument |
@thtrieu thanks for the information, I'll try on that! 👍 |
I am retraining yolov2 on VOC 2012 with 20 classes and did not change any parameter. Loss is now at 0.01 and still cannot see any bounding box after 7000 steps. Should I just keep training or is this the sign there is an issue? |
Have you looked at postprocess in net/yolo/test? There is a _tresh dict that may disrupt your output. I had to remove it to make it work |
@Dref360 that dict is removed in newer versions, please update your code @AndreaPisoni Please give the steps to reproduce your error. |
Hi I am trying to train YoloV2 on my different dataset. I have created an annotation file as per PASCAL VOC format. I am trying to identify shoes and bags in the images. As suggested by users ( @ryansun1900 , @y22ma, @thtrieu ) on this repo I used 3-5 images and annotations to train. I used I used a This is the command I used to train,
After I ran 200 epochs I got
I looked for matrices which had values in them and found some values around step 176, so I loaded that model and reran the training with a smaller
But the images do not have bounding boxes. Can you please guide me . I am not sure if I have missed any step in between. |
I think you are doing fine. Just that the model has not converged. A trained voc model with 20 classes has loss around 4.5; so two classes should be significantly smaller than that. And you are doing it with only 3-5 images, so I would say overfitting should be the case, i.e. |
@thtrieu, what do you suggest in that case. I have also disabled noise augmentation during the over-fitting. ## Update: I could bring down the loss to almost 0.01. Had to use a a different optimizer; RMSPROP works better. But when I test, there are still no bounding boxes. This is the command I am using.
I checked the output of the box probabilities and they are very low, in the order of < 1e-3. |
I have the same problem training on my own toy dataset with 2 classes model. Training process converges according to loss function decreasing, but draws nothing during testing. What I am doing wrong? |
Update: I got it working! I have bounding boxes. I used |
@hemavakade, |
@eugtanchik I am not sure I understood you. I loaded the yolo.weights but used it to overfit my dataset. Do you mean to say |
@hemavakade, |
@eugtanchik well I have more classes. I was trying to get it work with a small number of classes. To train further for other classes, I will try the following options.
|
@hemavakade, |
My problem was fixed by just more number of steps were finished, and I saw some detections. It works fine! |
solutions suggested here didn't solve my problem. Please advise! |
I am facing similar issue. I trained on own dataset with 3 classes using pre-trained imagenet model i.e. darknet19_448.23 for yolov2.. |
Same issue. Here are the steps I took: When testing with both the training set and testing set, there were no bounding boxes. If someone could advise how to change from 20 classes to 6 classes, that would be appreciated as well. |
It worked for me. It is relatively easy in Yolov2 to change the config file to incorporate your data (no additional changes). You need to train for more iterations. Initially, I wasn't detecting any bounding but after training for 40k iterations, I finally could see detection though the result was poor (you need to tune anchors). |
@sharoseali |
where i can add labels.txt?? |
@sharoseali |
youyuge34............ i have checked the weights file and its corresponding cfg file .. they are giving the same error.. even yolov2-tiny-voc are also not working with their cfg..... youyuge34 can u h play with darknet on Linux and coco data-set?? .. if yes what was your experience. i have 2000 xml files in voc format .. .. I am thinking to convert them in coco format.. but i dont know how to train the data using coco in windows.... |
I face the same problem But I reduced the threshold to 0.0001 and I see many bounding boxes. |
@thtrieu I reached to loss ~1.6 with training on 32 classes But the confidence for all the objects is still 0.0 I need your help please! |
How can I change the number of iterations I am doing it with 1500 images divided into six classes are there anyways to change number of iteration? |
@denisli Can you show me the method to increase iteration at step 554 only I got a loss of 5.34 and I am training 1500 images for 6 classes is that enough or should I increase my dataset. |
increase the epochs size... if you havent a large dataset ..yoi can
increase the epochs size.... however..... if you need a better ..trained
model... you must have at least 300 to 500 images per class. hence for this
figure .. you can set epochs number to 1000
…On Mon, Jun 4, 2018, 2:27 PM Dhagash4 ***@***.***> wrote:
@denisli <https://github.com/denisli> Can you show me the method to
increase iteration at step 554 only I got a loss of 5.34 and I am training
1500 images for 6 classes is that enough or should I increase my dataset.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS8u8jLTOQsN-1WJh5_afkAjH2cbzBdDks5t5P1xgaJpZM4MYRwc>
.
|
@sharoseali Now I will be trying class by class I have 1000 images for that class lets see if I can get the bounding box with epoch 1000. Thank you for guiding me. I will let you know the result. |
okay.. thats also the way to do this....what weights you are using....
.tiny yolo or other......??
let me know ...
…On Tue, Jun 5, 2018, 10:12 AM Dhagash4 ***@***.***> wrote:
@sharoseali <https://github.com/sharoseali> Now I will be trying class by
class I have 1000 images for that class lets see if I can get the bounding
box with epoch 1000. Thank you for guiding me. I will let you know the
result.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS8u8t0jkvXhcjxlGxkoKhksU6txLhz6ks5t5hNSgaJpZM4MYRwc>
.
|
I am training two classes with 945 image for one class and 405 for another I am using tiny-yolo-voc weights currently should I change the weights? |
No , i was only asking to let me know..about weights. i used tiny yolo
voc.... for training.. but i got error when testing testing my model....
i tried for other weights like yolo- voc weights ... but they were no
matching with their corresponding cfg file...
so ... now i am looking for cfg and weights file which can match ..each
other and train my model...
anyhow ... you continue to train your model with more epochs and
share....your results .
..best of luck....
…On Tue, Jun 5, 2018, 4:46 PM Dhagash4 ***@***.***> wrote:
I am training two classes with 945 image for one class and 405 for another
I am using tiny-yolo-voc weights currently should I change the weights?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS8u8kdPb9i_OWnjUMFjXJxZrcsfG7prks5t5m-dgaJpZM4MYRwc>
.
|
@sharoseali I got the bounding boxes after 5000 steps but the problem is when I downloaded a image from google and tested it was not detecting it. How can I solve that problem is it overfitting problem. Also it was not labelling it like stop sign its just getting bounding boxes nothing written on it which is it and all. Also not detecting anything in the video what to do anybody..... I am doing the training with LISA extension dataset from VIVA website |
Dhagash4 .. I leave this work for some time after i got error .. and was
busy in other work .. In coming days i will start again.......... have u
accomplished................???
…On Thu, Jun 7, 2018 at 3:48 PM Dhagash4 ***@***.***> wrote:
@sharoseali <https://github.com/sharoseali> I got the bounding boxes
after 5000 steps but the problem is when I downloaded a image from google
and tested it was not detecting it. How can I solve that problem is it
overfitting problem....
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS8u8tF7w8PR0YI90DvXxEalqZeFL-ykks5t6QT8gaJpZM4MYRwc>
.
|
Start Command:
Dataset:
Loss
Config:
What loss is typical of "convergence"? I ran 1000 epochs (22k + steps!) which resulted in very very low loss ~0.1% However my bounding boxes were only drawn around images the model had previously seen (IE they are part of the training set) - I suspect either my training set of data isn't large enough or that the model is WAY overfit and it will only match images it has already seen.
|
Can you share your code? |
hey everyone |
Hi sir, Iam training darknet using yolov3. I have trained 200 images and I can see the label but no bounding boxes around them.Can I know what is the reason? |
Hi, I am also facing the same issue. My model is not able to detect the bounding box. When I set the threshold to 0.00001, it is showing up too many boxes. @ManasaNadimpalli Please give some suggestions. I modified the .cfg file according to my class(# classes =1) |
@KamelBouyacoub como haces para disminuir el umbral y que te muestre muchos cuadros? Ayudame con eso porfavor |
I has the same problem with not getting the bounding boxes. |
I am also facing the same issue as @KamelBouyacoub
Does this mean it is not converging? |
Have the same issue: |
I faced the problem too. No bounding box at all. Any solution? |
@thtrieu |
the same here |
Hello,
Currently I am trying to train the yolo.cfg (version 2) with 2 labels. (I want to recognise Dark Vador and Yoda in my test images.) I changed the number of classes in yolo.cfg, and I renamed it yolo-5C.cfg.
So I put 2 labels in labels.txt, I created the annotation files, and finally I started the training using CPU with this command:
./flow --model/yolo-5C.cfg --load bin/yolo.weights --dataset pascal/VOCdevkit/IMG --annotation pascal/VOCdevkit/ANN --train --trainer adam
I changed the following parameters in the file flow.py:
There are 120 images (40 images with only Dark Vador ,40 images with only Yoda and 40 images with both of them) and 120 annotations
My problem is that after 12 hours of training on cpu, and after having started the test with the --test argument, it displays NO BOXES in the output images. But when I decrease the threshold to 0.00001, it displays many boxes. I want to understand how can I improve my training to have correct object detections. Can you give me please some advices.
Thanks.
The text was updated successfully, but these errors were encountered: