Skip to content

Count the number of occurrences of various objects in single or multiple images, leveraging the capabilities of GroundingDINO. This extension enhances GroundingDINO's usability by incorporating object counting functionality, providing a total count of detected items.

shrimantasatpati/GroundingDINO_Object_Counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

GroundingDINO_Object_Counter

Table of Contents

Objective

Count the number of occurrences of various objects in single or multiple images, leveraging the capabilities of GroundingDINO. This extension enhances GroundingDINO's usability by incorporating object counting functionality, providing a total count of detected items.

Configuration

  • CLASSES - Classes to detect in images (Modify the items in the CLASSES list to detect different objects)
    * ['headlamp', 'men underwear', 'book', 'candy', 'paper', 'box', 'bottle']

  • BOX_THRESHOLD - 0.30 (bounding box detection)

  • TEXT_THRESHOLD - 0.20 (threshold for text detection)

Output images

  1. Object Counting On Single Image (Sample):

Results for 20231121_121427.jpg:
  • headlamp: 3
  • men underwear: 0
  • book: 0
  • candy: 0
  • paper: 3
  • box: 11
  • bottle: 4

Pro Tip: Use GPU Acceleration - Google Colab T4 GPU

Steps in this Tutorial

In this tutorial, we are going to cover:

  • Before you start - Make sure you have access to the GPU
  • Install Grounding DINO - Setup Python environment.
  • Mount Example Data from Google Drive
  • Load model
  • Single Image Inference
  • Multiple Image Inference

Dataset Link - Request to author

Credits - Inspired from RoboFlow GroundingDINO notebooks

GitHub arXiv

Grounding DINO can detect arbitrary objects with human inputs such as category names or referring expressions. The key solution of open-set object detection is introducing language to a closed-set detector DINO. for open-set concept generalization. If you want to learn more visit official GitHub repository and read the paper.

grounding dino figure

Contributing

Contributions to the GroundingDINO Object Counter are welcome! If you'd like to contribute to the project, please follow these steps:

  • Fork the repository to your own GitHub account.
  • Create a new branch for your feature or bug fix.
  • Make your changes and ensure that the code passes all tests.
  • Create a pull request to the main repository, explaining your changes and improvements.
  • Your pull request will be reviewed, and if approved, it will be merged into the main codebase.

License

This project is licensed under the MIT License.


For more information on how to use, configure, and extend the GroundingDINO Object Counter, please refer to the GroundingDINO paper and Roboflow notebooks or contact the project maintainer.

Happy coding with GroundingDINO_Object_Counter! 🚀

About

Count the number of occurrences of various objects in single or multiple images, leveraging the capabilities of GroundingDINO. This extension enhances GroundingDINO's usability by incorporating object counting functionality, providing a total count of detected items.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published