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

Vehicle Counting #36

Closed amaadmirza closed 5 years ago

amaadmirza commented 5 years ago

Hi, can we add targeted_objects = "car, bus, truck" in vehicle_counting.py file i want to count upon these target objects. how to update this code to specifically detect upon these targeted_objects = "car, bus, truck"??

need help

ahmetozlu commented 5 years ago

You can find it on readme: https://github.com/ahmetozlu/tensorflow_object_counting_api#2-usage-of-real-time-counting-mode

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

targeted_objects = "car, bus, truck" # (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_enabled, targeted_objects, fps, width, height) # targeted objects counting