GithubHelp home page GithubHelp logo

ahmetozlu / object_detection_chooch Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 3.0 31.04 MB

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

Home Page: https://chooch.ai/

License: MIT License

Python 100.00%
object-detection object-counting computer-vision image-processing chooch-ai real-time-object-detection

object_detection_chooch's Introduction

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.

object_detection_chooch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

object_detection_chooch's Issues

Developing video stream processing feature

I used your project for one of my object counting project and it works perfect for object counting on single image. Its speed and detection accuracy amazing! I have not heard chooch api far so I think it is a new tech in this field! I am planning to create an account and use this awesome api with my own api key in my projects but I really wonder it has capabilities for producing results in video stream processing.

I am not a python proıgramming master so I could not modify your codes to process video stream for my project so do you have any plan to extend your this perfect project to process video as well?

Thanks and regards...

error while executing

I am getting the following error while exceuting .

{"detail":"Not Found"}
{'detail': 'Not Found'}

KeyError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_2224/1869963564.py in
58 print(json_data)
59 # parse the detected object names and pixel locations
---> 60 for i in json_data["objects"]["predictions"]:
61 if i["object_title"] in detection_data:
62 detection_data[i["object_title"] +"_" + str(counter)] = i["coordinates"]

KeyError: 'objects'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.