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

Multiple target objects #17

Closed mahavird closed 5 years ago

mahavird commented 5 years ago

Hi,

How can we count multiple target objects at a give time, for example in place of placing target objects as person or car at an instant, how can we pass both of them to the counting at the same moment ?

eleenathomas commented 5 years ago

Hi,

Could you work it out?

ahmetozlu commented 5 years ago

Sample usage of "detecting, counting and tracking the multiple targeted objects":

targeted_objects = "person, bicycle" # (for counting targeted objects) change it with your targeted objects
fps = 25 # change it with your input video fps
width = 1280 # change it with your input video width
height = 720 # change it with your input video height
is_color_recognition_enabled = 0
object_counting_api.targeted_object_counting(input_video, detection_graph, category_index, is_color_recognition`