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

detect wrong #7

Open
Superman0307 opened this issue Jun 7, 2021 · 3 comments
Open

detect wrong #7

Superman0307 opened this issue Jun 7, 2021 · 3 comments
Labels
question Further information is requested

Comments

@Superman0307
Copy link

After finishing train 100 epoch with voc dataset,I detect the train sample.but It's find nothing .
the Loss about 500.

@Superman0307 Superman0307 added the question Further information is requested label Jun 7, 2021
@kalikhademi
Copy link

kalikhademi commented Jun 18, 2021

I have the same issue. I train without any problem with loss around 200 but when I run detect.py it shows the message no box detected which means there is not bbox detected. Were you able to figure this out @LongxingTan ?

@AI-Passionner
Copy link

I had the same issue, using the pre-trained model (converted from pytorch). In the detect.py, there might be something wrong with pred_bbox. I am debugging now.

@AI-Passionner
Copy link

Figured it out. It seems that the detect.py has some bugs there. The model was yolo5s, converted from the Ultralytics yolo5. What I did are following:

  1. comment out the next two lines. If you check the function batch_non_max_suppression(). Those variable definitions are not consistent.

pred_bbix = [tf.reshape(x , ...]

pred_bbox = tf.concat(pred_bbox, ...)

  1. The predictions of bbox are [0, 1]. We need to re-scale back to the image input size, for example, 640x640 (depending on your training model). I added two lines before calling the resize_back().
    bboxes[:, [0,2]] = bboxes[:, [0,2]] *640
    bboxes[:, [1,3]] = bboxes[:, [1,3]] *640

Then it fixed the problem of no box detected. Hopefully, this is helpful.

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

No branches or pull requests

3 participants