Skip to content

MJAHMADEE/Object_Detection_and_Counting

Repository files navigation

Object Detection and Counting with Faster R-CNN 🚗👀

Python PyTorch Computer Vision

This repository demonstrates an implementation of Faster R-CNN for object detection and counting, applied on the PASCAL VOC dataset. The model is trained to recognize and count various object categories in images.

Features 🌟

  • Utilizes Faster R-CNN with a ResNet-50 backbone for object detection.
  • Trained and evaluated on the PASCAL VOC dataset.
  • Includes scripts for training, evaluation, and visualization of the model's predictions.
  • Provides functionality to plot images with bounding boxes for detected objects and their labels.

Setup and Installation 🛠️

  1. Clone the repository.
  2. Ensure Python and PyTorch are installed.
  3. Download the required dataset and place it in the specified directory.
  4. Install all the dependencies listed in requirements.txt.

Dataset 📁

The model is trained and tested on the PASCAL VOC dataset, which includes a wide range of object categories and annotated images.

Training the Model 🚀

  • The training script initializes the Faster R-CNN model and sets up the dataset for training and validation.
  • A custom training loop is implemented to monitor the training process, including loss calculation and optimization.

Evaluating the Model 🧪

  • The evaluation script loads the trained model and performs object detection on the test dataset.
  • Performance metrics are calculated to assess the accuracy of the model.

Visualization 📊

  • Visualization functions are provided to display the images with bounding boxes around detected objects, alongside their predicted classes and scores.

Contributing 🤝

Contributions to the project are welcome. Feel free to fork the repository, make changes, and submit a pull request.

License 📜

The project is open-sourced under the MIT License.

Acknowledgements 🙌

  • The PyTorch team for providing an excellent deep learning framework.
  • The PASCAL VOC dataset maintainers for providing a rich dataset for object detection tasks.

For more details, please visit the GitHub repository.