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 546 forks source link

Error while running single image object counting . py #7

Closed aari1-sowmya closed 6 years ago

aari1-sowmya commented 6 years ago

I am working on a project called " product recognition in Super Market Shelves ". I have images of shelves with products like Maggi and Dark Fantacy and I am able to detect these products with TF object detection API. Now I want to count how many number of maggi and how many number of dark fantacy is there in given image. So I thought , I can achieve this by using your TF object Counting API and I executed Single Image Object Counting .py program. When I am executing I got error as below. screenshot from 2018-09-24 10-42-24

aari1-sowmya commented 6 years ago

For my project I want results as follows. 42241094-14163cc8-7f12-11e8-83ed-68021b5e3b33

aari1-sowmya commented 6 years ago

To get these result , what type of changes that I need to do in the code. So that I can count number of maggi packets and number of Dark Fantacy packets in the given image. Please kindly help me with this.

mobileonekh commented 6 years ago

I also face exactly the same error as @aari1-sowmya

Any suggestion?

mobileonekh commented 6 years ago

ok, i found the error. It's because of "Indentation issue" in the file object_counting_api.py. It's not properly indent

aari1-sowmya commented 6 years ago

did you got results now?

aari1-sowmya commented 6 years ago

Where I need to remove indentations

mobileonekh commented 6 years ago

Replace with this file. It will work

https://www.dropbox.com/s/u3smzyg9alfmcbg/object_counting_api.py?dl=0

ahmetozlu commented 6 years ago

thanks @mobileonekh