In this project, you have learned how to create your own training pipeline for instance segmentation models, on a custom dataset. For that, we wrote a torch.utils.data.Dataset class that returns the images and the ground truth boxes and segmentation masks. We also leveraged a Mask R-CNN model pre-trained on COCO train2017 in order to perform transfer learning on this new dataset.
Penn-Fudan Database for Pedestrian Detection and Segmentation. It contains 170 images with 345 instances of pedestrians, and we will use it to illustrate how to use the new features in torchvision in order to train an instance segmentation model on a custom dataset.
In this project, we will be using Mask R-CNN, which is based on top of Faster R-CNN. Faster R-CNN is a model that predicts both bounding boxes and class scores for potential objects in the image.
git clone my repository conda create -p env python=3.8 -yconda activate envpip install -r requirements.txthttps://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exesudo apt-get install apt-transport-https ca-certificates gnupgecho "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.listcurl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -sudo apt-get update && sudo apt-get install google-cloud-cligcloud initBefore running server application make sure your Google Cloud Storage bucket is available
python app.py-
Check if the Dockerfile is available in the project directory
-
Build the Docker image
docker build -t track .
- Run the Docker image
docker run -d -p 8080:8080 <IMAGEID>
- Open docker image in interactive model
docker exec -ti <IMAGEID> bash
- Authenticate GCloud
gcloud auth login
- Authenticate default application
gcloud auth application-default login
👨💻 Tech Stack Used
- Python
- Pytorch
- Docker
🌐 Infrastructure Required.
- Google Cloud Storage
- Google Compute Engine
- Google Artifact Registry
- Circle CI
Artifact : Stores all artifacts created from running the application
Components : Contains all components of this project
- DataIngestion
- DataTransformation
- ModelTrainer
- ModelEvaluation
- ModelPusher
Custom Logger and Exceptions are used in the project for better debugging purposes.
=====================================================================