ahmetozlu / object_detection_chooch

A sample project for super fast real time object detection and counting using CHOOCH AI API and OpenCV.

Home Page:https://chooch.ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object Detection by using CHOOCH AI API

This repository focuses developing a sample project for super fast object detection and counting using CHOOCH AI API and OpenCV. CHOOCH AI is used for super fast object detection, OpenCV is used for drawing bounding boxes and saving the output images.

CHOOCH AI provides object detection in milliseconds and it is reachable from any edge devices since it uses HTTP methods (as like a RESTful web service).


Some of the cool features of this project:

  • Detecting the objects in milliseconds.
  • Counting the objects in milliseconds.
  • Detecting the texts in milliseconds.
  • Cropping the detected objects and saving them as new images.
  • Cropping the detected texts and saving them as new images.
  • Storing the detected objects titles and pixel coordinates in a csv file.
  • Storing the detected texts and pixel coordinates in a csv file.

Software Architecture

Here are the explanation of software work-flow:

  • Input image is sent (http post) to CHOOCH AI and then detected objects information fetch in json format.
  • Json string is parsed and detected objects are stored in a dictionary (key='object_title', value='coordinates').
  • Drawing bounding boxes around the etected object using OpenCV.
  • Cropping the detected objects and saving as new images using OpenCV.
  • Storing the detected object informatin in csv files.

Folders and files explanations

Here are the explanation of folders and files:

  • main.py: Main python program that contains all of the logic.
  • detected_objects: Detected objects are cropped and saved as new images under this folder.
  • detected_texts: Detected texts are cropped and saved as new images under this folder.
  • input: Input images are located under this folder.
  • output: Output images are stored in folder.
  • object_detection.csv: Detected object information are stored in this csv file.
  • text_detection.csv: Detected text information are stored in this csv file.

Installation

You don't need to instal any fancy library or package to run this program. CHOOCH AI provides its object detection services with HTTP methods so it can be reacheable by any edge devices. You just need to install OpenCV for basic image procesing operations (like cropping the images, saving the images and etc.).

OpenCV can be installed by pip:

pip install opencv-python

Moreover, please update the API key with your own key on line#7 in main.py.

Citation

If you use this code for your publications, please cite it as:

@ONLINE{
    author = "Ahmet Özlü",
    title  = "Object Detection and Counting with CHOOCH AI API",
    year   = "2021",
    url    = "https://github.com/ahmetozlu/object_detection_chooch"
}

Author

Ahmet Özlü

License

This system is available under the MIT license. See the LICENSE file for more info.

About

A sample project for super fast real time object detection and counting using CHOOCH AI API and OpenCV.

https://chooch.ai/

License:MIT License


Languages

Language:Python 100.0%