models icon indicating copy to clipboard operation
models copied to clipboard

object_detection_tutorial.ipynb doest not generate boxes on picture

Open Gagazet opened this issue 9 years ago • 20 comments

Hello everyone! Have a problem with object_detection_tutorial.ipynb, when executing it, at the final images I don't have any boxes, just dogs, and beach, totally clean~ Test, by python object_detection/builders/model_builder_test.py works well at the terminal. Using ubuntu 14, last version of tf and python 2.7 What can it be?

Gagazet avatar Nov 13 '17 04:11 Gagazet

I have same problem, It worked with 'faster_rcnn_inception_v2_coco_2017_11_08' model. But there is a problem with 'ssd_inception_v2_coco_2017_11_08' and 'ssd_mobilenet_v1_coco_2017_11_08'.

Rasoul20sh avatar Nov 13 '17 08:11 Rasoul20sh

The same

kaka-lin avatar Nov 13 '17 10:11 kaka-lin

Same problem. Below is what it prints for the boxes. They look either out of range or on corner of images

[[[ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0.20880127 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0.20934105 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0.20880127 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0.74907494 0.14624405 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1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. 1. ] [ 0. 0.68494415 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0.68494415 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0.68494415 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0.68494415 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0. 1. 1. ] [ 0. 0.68494415 1. 1. ] [ 0. 0.68494415 1. 1. ]]]

write2mouli avatar Nov 13 '17 17:11 write2mouli

I have the same issue on both windows and mac OS windows OS: 8.1 Python: 3.5.4 Mac OS OS: 10.11.6 Python: 2.7.10

Really frustrated...

sunzhuoshi avatar Nov 14 '17 01:11 sunzhuoshi

I have the same problem ...

marco-cardoso avatar Nov 14 '17 13:11 marco-cardoso

I also have this issue, tried it with python 3.5 and 3.6. Could not get the bounding boxes to appear on either Ubuntu 16.4 or macOS 10.13.1

bhamill638 avatar Nov 14 '17 13:11 bhamill638

Same here. Have issue with Ubuntu 16.04, Python 3.5 (and Python 3.6). Was so frustrated that suddenly it stopped working. I think the latest commits(5 days back) has introduced something. Bounding box overlay doesn't show up.

satvikmaker avatar Nov 14 '17 14:11 satvikmaker

Actual issue is not related to OS or Python version. On github we are so used to pulling master branch always which is a bad practice as it could be unstable.

Tensor 1.4.0 upgrade is assigning low scores for inception and mobile coco. The example works with fast-rcnn. Please use older version of tensor flow 1.3 for object detection example to work or use Fast rcnn model.

write2mouli avatar Nov 14 '17 16:11 write2mouli

@write2mouli you are correct, a workaround is to use the fast rcnn model, or an older version of the ssd_mobilenet model also seems to work.

See this issue for more details and workaround info.

bhamill638 avatar Nov 14 '17 17:11 bhamill638

I'll close this issue; please feel free to reopen if @write2mouli 's workaround is still not sufficient for you.

cy89 avatar Nov 16 '17 01:11 cy89

use ssd_mobilenet_v1_coco_11_06_2017.tar instead ssd_mobilenet_v1_coco_2017_11_08.tar doest not generate boxes

yuezhilanyi avatar Nov 17 '17 02:11 yuezhilanyi

Please try the new ssd models from the zoo. That should fix the problem. Here's the link for you convenience http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_2017_11_17.tar.gz

tombstone avatar Nov 18 '17 06:11 tombstone

I'm experiencing this problem when training locally on ssd ssd_mobilenet_v1_pets.config and trying to run evaluate and look at tensorboard. I posted a GitHub question about it: https://stackoverflow.com/questions/47384021/no-bounding-boxes-showing-up

codinalot avatar Nov 20 '17 01:11 codinalot

Actual issue is not related to OS or Python version. On github we are so used to pulling master branch always which is a bad practice as it could be unstable.

Tensor 1.4.0 upgrade is assigning low scores for inception and mobile coco. The example works with fast-rcnn. Please use older version of tensor flow 1.3 for object detection example to work or use Fast rcnn model.

master branch must always be stable

7carlosz avatar Feb 08 '19 20:02 7carlosz

I am using ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14 and encounter the same problem. Have you checked the scores in the output of the model? Because when testing results I print my scores and find them very weak and close(about 0.004, seeing below) [[0.00419687 0.00418497 0.00418139 0.00417583 0.00416805 0.00415858 0.00415558 0.00415351 0.00413164 0.00413113 0.00412714 0.00411862 0.00411856 0.00411649 0.00411184 0.00411016 0.0041098 0.00410919 0.00409758 0.00409442 0.0040899 0.00408842 0.00408763 0.00408626 0.00408024 0.00407811 0.00407482 0.00407472 0.0040736 0.00406982 0.00406742 0.00406425 0.00406279 0.00406104 0.00406103 0.00405826 0.00405772 0.0040577 0.00405703 0.00405589 0.0040556 0.00405431 0.00405431 0.00405312 0.00405309 0.00405135 0.00405067 0.00404945 0.00404913 0.00404735 0.00404232 0.00404043 0.00403672 0.00403497 0.00403496 0.00403377 0.00403241 0.00403187 0.00402924 0.00402779 0.00402603 0.00402491 0.00402476 0.00402465 0.00402272 0.00401924 0.00401717 0.0040153 0.00401324 0.0040128 0.00401214 0.00400906 0.00400729 0.00400648 0.0039996 0.00399941 0.00399737 0.00399632 0.0039911 0.00398869 0.00398591 0.00398581 0.00398468 0.00398437 0.00398409 0.00398409 0.00398229 0.00398111 0.00397723 0.00397705 0.00397654 0.00397599 0.00397588 0.00397508 0.0039742 0.0039735 0.00397325 0.00397292 0.00397287 0.00397195]] So is this also a bug of the model? Shall I change another model?

FoilHao avatar May 30 '19 10:05 FoilHao

I used

ssd_mobilenet_v1_coco_11_06_2017 To train my own dataset and it didn't create bounding boxes at the end even though i aquired a loss of 0.9 and also i tried it on

faster_rcnn_inception_v2_coco_2018_01_28 still didn't create bounding boxes, help please

jsn-bln avatar Nov 16 '19 01:11 jsn-bln

I used

ssd_mobilenet_v1_coco_11_06_2017 To train my own dataset and it didn't create bounding boxes at the end even though i aquired a loss of 0.9 and also i tried it on

faster_rcnn_inception_v2_coco_2018_01_28 still didn't create bounding boxes, help please

Did you use model_main.py or ./legacy/train.py to train? Because I met similar issue when using train.py , but it worked with model_main.py

FoilHao avatar Nov 16 '19 02:11 FoilHao

I used

ssd_mobilenet_v1_coco_11_06_2017 To train my own dataset and it didn't create bounding boxes at the end even though i aquired a loss of 0.9 and also i tried it on

faster_rcnn_inception_v2_coco_2018_01_28 still didn't create bounding boxes, help please

Did you use model_main.py or ./legacy/train.py to train? Because I met similar issue when using train.py , but it worked with model_main.py

Yes i did use train.py ill try model_main

jsn-bln avatar Nov 16 '19 02:11 jsn-bln

I used

ssd_mobilenet_v1_coco_11_06_2017 To train my own dataset and it didn't create bounding boxes at the end even though i aquired a loss of 0.9 and also i tried it on

faster_rcnn_inception_v2_coco_2018_01_28 still didn't create bounding boxes, help please

Did you use model_main.py or ./legacy/train.py to train? Because I met similar issue when using train.py , but it worked with model_main.py

It didn't generate bounding boxes either please share more on how did you able to run your trained model,

jsn-bln avatar Nov 17 '19 01:11 jsn-bln

this problem did not solve at all so far. and many people like me have it so far. any help pleas?

resan-m avatar May 21 '20 08:05 resan-m