Skip to content
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

NMS time limit 10.0s exceeded #2

Closed
tak-s opened this issue Aug 13, 2021 · 10 comments
Closed

NMS time limit 10.0s exceeded #2

tak-s opened this issue Aug 13, 2021 · 10 comments

Comments

@tak-s
Copy link

tak-s commented Aug 13, 2021

Thanks for sharing great works!

I am trying to train coco dataset.
When calculating mAP for val data, I got bellow warning.

WARNING: NMS time limit 10.0s exceeded

I think when found many bbox, nms cost is too much. then time limit exceeded.

So, I set/change conf_thres=0.1(default is 0.001), it's work no warning.

But, I am afraid that this change will affect learning performance. What do you think?

@XinzeLee
Copy link
Owner

It is correct that if increasing the conf_thres to a higher value (like 0.01) can work without warning. But modify the conf_thres from 0.001 to above may affect the "actual" evaluation of the final performance.
By the way, it is quite normal for the warning in the early stages of the training, since the network is still learning the characteristics of the classes. As a result, in early-stage, the network "almost-randomly" gives a lot of guesses, since it is not sure about the correct characteristics! After some training epochs (maybe several tens or hundreds, depending on dataset), the network will be more certain about its predictions, and the warning will disappear naturally.

@tak-s
Copy link
Author

tak-s commented Aug 13, 2021

Thank you.
I understood it well.

By the way, do you train with the COCO dataset?
I trained 300 epochs. I got mAP@.5=0.31 and mAP_0.5:0.95=0.16 with yolov5-s. Is this are reasonable?
image

@XinzeLee
Copy link
Owner

I haven't tried the full coco dataset. It is really good that you did the experiments!

I have tried with a small portion of classes of coco, such as beds, couch, cups, laptop, monitor, remotes, etc. From my perspective, the performance of mAP@.5=0.31 and mAP_0.5:0.95=0.16 are already pretty good considering that polygon labels are much harder than bbox (cx, cy, width, height). Intuitively, to get good performance for polygon labels, we need more data than bbox labels.

Can I check with you how did you get the polygon labels for coco dataset? Did you use the Polygon-Tutorial 2 to convert the segmentation labels to polygon labels? If that so, there might be a intrinsic vital problem with the labels: some segmentations are disjointed. These kinds of labels might cause trouble for the model to learn.
捕获

@tak-s
Copy link
Author

tak-s commented Aug 13, 2021

Oh, that's right.
Now my annotation for this repository is separated...

image

This annotation are two bag, two people. But, the correct polygon annotation is one bag and one person.

I will try to fix it.

@XinzeLee
Copy link
Owner

Yes, that is the case. If you found something, please let me know. Thanks!

@tak-s
Copy link
Author

tak-s commented Aug 13, 2021

Hi.
At seg2poly()

                    # if not crowded, use segmentation
                    if not object0['iscrowd']:
                        segments = [oneD2twoD(segment+segment[:2]) 
                                           for segment in object0['segmentation']]

change to below.

                    # if not crowded, use segmentation
                    if not object0['iscrowd']:
                        segments = []
                        for segment in object0['segmentation']:
                            segments.extend(oneD2twoD(segment+segment[:2]))
                        segments = [segments]

Since the separated information is connected, a connecting line is drawn when plotting, but I think that there is no problem in finding the quadrangle with minimum_rotated_rectangle.

image

@XinzeLee
Copy link
Owner

Really nice work! The disjointed problems for some connective objects are solved. But I have observed another issue: for class like "skis" as follows, both of the skis on left foot and right foot are connected together. I further looked into the coco dataset, and found that "pair of skis" is considered as a whole. Is that true?
图片

Thanks for your help! I will definitely mention your contribution in the new version of codes! Also, if it is possible, can you train the polygon-yolov5s on the new version of labels and test the performance?

@tak-s
Copy link
Author

tak-s commented Aug 13, 2021

Thank you for checking my code!
I'm glad to contribute this work.

My environment is poor and may take a few days, but I'll try to train with the modified labels.

@tak-s
Copy link
Author

tak-s commented Oct 25, 2021

I trained with the modified COCO labels on yolo-s based PolygonObjectDetection.
Best model's val score is below:
mAP@.5: = 0.334
mAP@.5:.95= 0.171

results
test_batch2_pred

@tak-s tak-s closed this as completed Oct 25, 2021
@tak-s
Copy link
Author

tak-s commented Nov 5, 2021

On yolox-l,
mAP@.5: = 0.424
mAP@.5:.95= 0.238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants