Skip to content

No bounding boxes are drawn when I run the colab without any modification with the default data provided #34

Open

Description

@balazsbanto

Hi!
I tried to run the provided colab with small modification but using the data provided in the colab, because otherwise it does not run: just adding %tensorflow_version 1.x, and !pip install tf_slim.
The training runs ok, but when I run the inference no bounding boxes are drawn on the images. Do you have any idea why these happens?
If I print out output_dict['detection_boxes'], I see a lot of coordinates, but are all below 1.

Activity

  1. a1usha commented on Oct 27, 2020

    @a1usha

    Same problem

  2. ADITYA964 commented on Jan 9, 2021

    @ADITYA964

    Hi, I found a way to solve this but I don't know that it may work for you.

    Methods that you can apply:-

    1. Change selected_model = 'ssd_mobilenet_v2' to selected_model = 'faster_rcnn_inception_v2' and train the model by setting value high for "num_steps" variable. ( By doing this, it worked for me and then bounding boxes were formed on the image )

    2. Try to use another visualization methods to display like for eg, use cv2.imshow(image_np) or cv2_imshow(image_np) instead of plt.imshow(image_np)

    Hope this helps.

  3. Riichiro-Oka commented on Jan 24, 2021

    @Riichiro-Oka

    @ADITYA964 Hi. I have same problem. I tried your suggestion 1. and it worked. But I want to make model for edge-TPU so I need to use ssd_mobilenet_v2. Is there any other solution? With mobilenet v2, training seems to go well but result seems bad. I think mAP value is strange.
    Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.000
    Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.000
    Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.000
    Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000
    Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
    Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000
    Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.000
    Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.000
    Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.000
    Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000
    Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
    Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000

  4. ADITYA964 commented on Jan 24, 2021

    @ADITYA964

    Hi @Riichiro-Oka, I am glad that it was helpful for you. I am also working to find a solution for it, but it's a mystery to find the cause for the " Mobilenet V2 " model's issue. And I also received the same improper results as you have mentioned above.

  5. Riichiro-Oka commented on Jan 24, 2021

    @Riichiro-Oka

    Thank you for your reply. I am wondering why person who wrote original notebook could do it well. Anyway, I will also try to find a solution.

  6. Riichiro-Oka commented on Jan 24, 2021

    @Riichiro-Oka

    @ADITYA964 I found the colaboratory training monilenet v2 well. I have not found out why this work but difference is numpy==1.17.5 is installed and iou_threshold = 0.50 is set.
    https://colab.research.google.com/github/luxonis/depthai-ml-training/blob/master/colab-notebooks/Easy_Object_Detection_With_Custom_Data_Demo_Training.ipynb

  7. ADITYA964 commented on Jan 24, 2021

    @ADITYA964

    Oh so it seems that it might be due to versions of package. Thanks for sharing , I needed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions