ahmetozlu / tensorflow_object_counting_api

🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
https://www.youtube.com/watch?v=yT_1eKJTdfk
MIT License
1.32k stars 545 forks source link

counting error #44

Closed linchunmian closed 3 years ago

linchunmian commented 5 years ago

hi, thanks for your great job! I successfully ran the script 'vehicle_counting.py', but when I check the result 'output.avi', it seems some errors happened:

  1. vehicle counting: in the resulting video, the value of vehicle through the roi_position cannot match with vehicle counting that presents in the video.
  2. error bbox: in the resulting video, there are some blue bounding box labelled 'smurf', which makes me so confused that what is the problems?

Can you help me fix this problems? Thanks a lot!

ahmetozlu commented 5 years ago
  1. It depends the object detector, when the object detector could not detect the object then the object counting algorithm can not work properly. I suggest you try a different object detector (YOLO, RCNN, etc.) thus there must not be any false positive or true negative counted objects. The SSD MobileNet detector in this repo is a general purpose one (not optimized specifically for vehicle/pedestrian detection) thus there can be some missed detection so it effects the counting algorithm performance directly.
  2. It is not possible, are you sure that you use SSD MobileNet frozen inference graph and SSD MobileNet label map? It seems like you use wrong model or label map.
linchunmian commented 5 years ago

@ahmetozlu Thanks.

  1. I have try to other pretrained models downloaded from tensorflow/models website, like SSD_resnet, Faster RCNN_resnet, but the performance is not substantially better. So I don't check where the problem and cannot solve it thoroughtly.
  2. And then, I am not very sure whether I loaded wrong model and label map. My setting follows your default condition and make a little modification. The resulting video predicts some bounding box with 'smurf', as follows. How can I tackle with? 2019-08-16 09-58-51屏幕截图 2019-08-16 10-00-01屏幕截图 what's more, I find that the value of vehicle passing through the ROI position cannot match to the counting, but I don't know how to solve it. I really need your help. Thanks in advance!
ahmetozlu commented 5 years ago
  1. It is fixed, can you check again, please?
  2. Since the SSD MobileNet detector in this repo is a general purpose one (not optimized specifically for vehicle/pedestrian detection) thus there can be some false positives or false negatives such as "surfboard" detection on the frame you shared. You can consider about performing transfer learning to increase the accuracy or you can use more powerful models such as Faster R-CNN.
ShaoDu commented 5 years ago

@ChunmianLin Hello, I have the same problem. Can we discuss it privately

linchunmian commented 5 years ago

@ahmetozlu Thanks.

  1. I am testing for it.
  2. I don't think this is problem of SSD Mobilenet or the insufficient accuracy. As I mentioned above, I have try other pretrained model, but the error still exists. The label map is corresponding to pretrained model, and test data is traffic survaillance. It seems to be absurd that geenrates results labelled 'smurf'? Could you please check your code that is shared with other applications? I think maybe there exist some errors in some shared feature layers or operations. Thanks a lot in advance.
linchunmian commented 5 years ago

@ShaoDu Sure. How to contact with you privately?

ShaoDu commented 5 years ago

@ChunmianLin Are you Chinese? If so, how can we communicate

linchunmian commented 5 years ago

yes.@ShaoDu

ahmetozlu commented 3 years ago

This issue totally solved, please try to run vehicle_counting.py and check the result.