Loading repository dataβ¦
Loading repository dataβ¦
ahmetozlu / repository
π 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!
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. Please contact if you need professional object detection & tracking & counting project with the super high accuracy and reliability!
You can train TensorFlow models with your own training data to built your own custom object counter system! If you want to learn how to do it, please check one of the sample projects, which cover some of the theory of transfer learning and show how to apply it in useful projects, are given at below.
Sample Project#1: Smurf Counting
More info can be found in here!
Sample Project#2: Barilla-Spaghetti Counting
More info can be found in here!
The development is on progress! The API will be updated soon, the more talented and light-weight API will be available in this repo!
You can find a sample project - case study that uses TensorFlow Object Counting API in this repo.
Usage of "Cumulative Counting Mode" for the "pedestrian counting" case:
is_color_recognition_enabled = False # set it to true for enabling the color prediction for the detected objects
roi = 385 # roi line position
deviation = 1 # the constant that represents the object counting area
object_counting_api.cumulative_object_counting_x_axis(input_video, detection_graph, category_index, is_color_recognition_enabled, roi, deviation) # counting all the objects
Result of the "pedestrian counting" case:
Source code of "pedestrian counting case-study": pedestrian_counting.py
1.2) For detecting, tracking and counting the vehicles with enabled color prediction
Usage of "Cumulative Counting Mode" for the "vehicle counting" case:
is_color_recognition_enabled = True # set it to true for enabling the color prediction for the detected objects
roi = 200 # roi line position
deviation = 3 # the constant that represents the object counting area
object_counting_api.cumulative_object_counting_y_axis(input_video, detection_graph, category_index, is_color_recognition_enabled, roi, deviation) # counting all the objects
Result of the "vehicle counting" case:
Source code of "vehicle counting case-study": vehicle_counting.py
Usage of "the targeted object is bicycle":
is_color_recognition_enabled = False # set it to true for enabling the color prediction for the detected objects
targeted_objects = "bicycle"
object_counting_api.targeted_object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled, targeted_objects) # targeted objects counting
Result of "the targeted object is bicycle":
Usage of "the targeted object is person":
is_color_recognition_enabled = False # set it to true for enabling the color prediction for the detected objects
targeted_objects = "person"
object_counting_api.targeted_object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled, targeted_objects) # targeted objects counting
Result of "the targeted object is person":
Usage of "detecting, counting and tracking all the objects":
is_color_recognition_enabled = False # set it to true for enabling the color prediction for the detected objects
object_counting_api.object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled) # counting all the objects
Result of "detecting, counting and tracking all the objects":
Usage of "detecting, counting and tracking the multiple targeted objects":
targeted_objects = "person, bicycle" # (for counting targeted objects) change it with your targeted objects
is_color_recognition_enabled = False # set it to true for enabling the color prediction for the detected objects
object_counting_api.targeted_object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled, targeted_objects) # targeted objects counting
Usage of detecting, counting and tracking "all the objects with disabled color prediction":
is_color_recognition_enabled = False # set it to true for enabling the color prediction for the detected objects
object_counting_api.object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled) # counting all the objects
Result of detecting, counting and tracking "all the objects with disabled color prediction":
Usage of detecting, counting and tracking "all the objects with enabled color prediction":
is_color_recognition_enabled = True # set it to true for enabling the color prediction for the detected objects
object_counting_api.object_counting(input_video, detection_graph, category_index, is_color_recognition_enabled) # counting all the objects
Result of detecting, counting and tracking "all the objects with enabled color prediction":
Just run object_tracking.py
For sample usages of "Real-Time Counting Mode": real_time_counting.py
The minimum object detection threshold can be set in this line in terms of percentage. The default minimum object detecion threshold is 0.5!
Here are some cool capabilities of TensorFlow Object Counting API:
Here are some cool architectural design features of TensorFlow Object Counting API: