finds.dev← search

// the find

ahmetozlu/tensorflow_object_counting_api

★ 1,332 · Python · MIT · updated Aug 2024

🚀 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!

A wrapper around TensorFlow 1.x Object Detection API that adds line-crossing counters (cumulative/real-time), color prediction via KNN on HSV histograms, and speed estimation for video streams. Aimed at developers who want vehicle or pedestrian counting without wiring up the TF detection pipeline from scratch. The GIFs in the README are from 2018 and the code shows it.

The ROI line-crossing logic (x-axis and y-axis modes) with configurable deviation zones is a practical solution that would take a few days to build correctly from scratch. Color recognition is a clever addition — KNN on color histograms is fast and works well for vehicle classification without adding a second model. The Mask R-CNN submodule for instance segmentation counting is a legitimate extension with separate training examples. Transfer learning walkthrough with the smurf and spaghetti examples gives a concrete path to custom object classes.

Pinned to TensorFlow 1.5.0 and Keras 2.0.8 — both are EOL and the TF1 Object Detection API is no longer maintained; the compatibility shim to TF2 suggested in the README (`tf.disable_v2_behavior()`) is a hack that breaks in TF2.x with eager execution in non-trivial ways. No tests at all, not even smoke tests for the counting logic. The tracker is centroid-distance based with no Kalman filter or ReID, so it loses objects on occlusion and double-counts anything that briefly disappears. The README says 'REST Architecture' is supported but there is no HTTP server, route, or endpoint in the repo — that claim is just false.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →