This project detects multiple instances of books in scene images using SIFT feature extraction, FLANN-based feature matching, and RANSAC homography. It visualizes detected books with color-coded bounding boxes and computes internal metrics to assess detection quality.
- Detect multiple instances of the same book in a scene.
- Color-coded bounding boxes per model.
- Iterative detection for crowded scenes.
- Internal quality metrics:
- Number of good matches
- Inlier ratio from RANSAC
- Reprojection error
- Bounding box area and aspect ratio
- Debug mode for visualizing keypoints, matches, and masks
-
OpenCV (opencv-python)
-
NumPy
-
Matplotlib
-
Jupyter
-
Put the dataset.zip file under a new folder in your Google Drive account, named as you want. Just remember to change the path when extracting in the notebook.
-
Open the notebook:
jupyter notebook book_detection.ipynb
-
Execute cells sequentially.
-
Provide paths for /models and /scenes folders if required.
Outputs:
Number of instances for each model and bounding boxes with drawn on scene images with different colors.
scale_factor: scale applied during preprocessing (default 3.0)
min_matches: minimum number of good matches for RANSAC (default 30)
colors: list of RGB colors for bounding boxes
debug: True to visualize intermediate results (keypoints, matches, masks)
This project is licensed under the MIT License. See the LICENSE file for more details.

