Object detection#
This series of notebooks demonstrates an object detection ML life cycle.
- Face Mask Detection Pipeline
- Fine-tuning a face mask detection model with Faster R-CNN
- Set up dependencies
- Set up compute resources
- Kaggle data on AWS S3
- Inspect an example image
- Inspect an annotation file in Pascal VOC format
- Parse Pascal VOC annotations
- Batch image retrieval from S3
- Set up Ray Train for distributed fine-tuning / training
- Launch the fine-tuning / training process with TorchTrainer
- Inspect results when training completes
- Run inference and visualize predictions on a test image
- Store the trained model locally
- Store the model on Anyscale cluster storage
- Store the model in the cloud
- Clean up the cluster storage
- Next steps
- Object detection batch inference on test dataset and metrics calculation
- Imports, class mappings, and visualization colors
- Load the fine‑tuned object detection model from S3 to Anyscale cluster storage
- Create the test dataset using Ray Data
- Define the batch object detection model for inference
- Run batch inference on the Dataset
- Process predictions and compute evaluation metrics
- Evaluation metrics
- Video processing with object detection using batch inference
- Why use Ray and Anyscale for batch inference
- Import libraries and define label mappings
- Load and split video into frames
- Load the object detection model
- Apply the object detection model
- Draw bounding boxes and labels on each frame
- Collect and sort processed frames
- Generate the output video
- Inspect the output video
- Host an object detection model as a service
- Why use Ray Serve and Anyscale
- Inspect
object_detection.py
- Run the object detection service with Ray Serve
- Send a request to the service
- Shut down the service
- Production deployment
- Check the status of the service
- Query the service
- Advanced configurations
- Terminate your service
- Clean up the cluster storage