This repository extends the concept of generating a full object detection heatmap using a counter-based approach and integrates the capability to save detection data in SQLite. The heatmap visually represents the density or frequency of detected objects across an image, while SQLite allows for efficient storage and querying of detection metadata.
-Python (version 3.x recommended) -OpenCV -NumPy -SQLite3 (comes with Python standard library)
-Object Detection:
-Use a pre-trained object detection model that outputs bounding boxes for objects in an image. This repository assumes you have this model and can generate detection results. SQLite Integration:
-The script generate_heatmap_and_save_to_sqlite.py demonstrates how to generate a heatmap and simultaneously save detection data into an SQLite database (grid2.db). Generate Heatmap and Save Data:
-Modify generate_heatmap_and_save_to_sqlite.py to load your object detection results and save them into SQLite. Replace the placeholder code with your actual detection and SQLite insertion logic.
Copy code python generate_heatmap_and_save_to_sqlite.py View Heatmap and Query SQLite Data:
The generated heatmap (heatmap.png) will be saved in the same directory. Use SQLite commands or a database viewer to query and analyze detection data stored in grid2.db.