This model aims to do real-time crime detection using OpenCV and FasterRCNN_resnet50_fpn. The main motive is to loop over each image that passed through this model and if model detects a "Crime_Activity" just bound that detection in bbox.
To run this project, you need to install the following libraries:
- Python 3.12+
- Open-CV: Open-CV is a poweful library for computer vision and image processing tasks.
- Torch: This library is primarily used for building and training deep learning models.
- Torchvision: It is a companion library for PyTorch mainly used for fine-tuning deep learning models for vision applications like object detection and segmentation.
- Numpy: It provides support for creating and manipulating multi-dimensional arrays and matrices.
Other Utility Libraries : Matplotlib, glob2, tqdm, albumentations.
pip install opencv-python
pip install numpy
pip install torch torchvision
pip install matplotlib
pip install glob2
pip install tqdm
pip install albumentations
- Create new directory 'COD'.
- Inside that directory/folder create new environment.
python -m venv cod
Now, activate this 'cod' venv.
- Clone this Repository :
https://github.com/Rajcr2/CD.git
- Now, Install all mentioned required libraries in your environment.
- After, that Run 'engine.py' file from Terminal. To train the model it will take time but make sure that model is not overfitting.
python engine.py
- After, Model Training completed just Run the 'inference.py' that will load trained model and will give us predicted output results.
python inference.py