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.
-
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)
- headlamp: 3
- men underwear: 0
- book: 0
- candy: 0
- paper: 3
- box: 11
- bottle: 4
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
Credits - Inspired from RoboFlow GroundingDINO notebooks
- Research articles
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.
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.
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! 🚀