This will install pycocotools into your opreating system.
After that install the requirements specified in the requirement file.
pip install -r requirement.txt
To build the Detectron2 you need fvcore
git clone https://github.com/facebookresearch/fvcore
cd fvcore
python setup.py install
When all the requirements are installed clone the official repository of Detectron2 project from here or you can clone it by the process given below
git clone https://github.com/facebookresearch/detectron2.git
cd detectron2
python setup.py build develop
After doing that all you need are pretrained models and pretrained weights.
You can get pre trained Mask RCNN model from here and pre trained weights from here Place these models and weights in the working directory of the python script.
At Last you need to download the Base RCNN model from here and you need to place this file out of the current working directory in the previous directory to use this base model.
After configuring this just run the python script given in the code put your image name or path in the script and run this.
Enjoy
Author
You can get in touch with me on my LinkedIn Profile:
Saad Hassan
You can also follow my GitHub Profile to stay updated about my latest projects:
If you liked the repo then kindly support it by giving it a star ⭐!
Contributions Welcome
If you find any bug in the code or have any improvements in mind then feel free to generate a pull request.
Issues
If you face any issue, you can create a new issue in the Issues Tab and I will be glad to help you out.