Case Study
Computer Vision Segmentation Pipeline
Problem
A healthcare-adjacent client needed automated image segmentation for clinical workflow support, with both cloud API access and offline mobile deployment. The system had to handle variable inference load and large images exceeding model input resolution.
Approach
Built an asynchronous inference pipeline using Flask for the API layer, RabbitMQ for job queuing, and PyTorch for model inference. Developed sliding-window inference for large image processing, post-processing for mask refinement, and visualization outputs. Deployed optimized models to Android using TorchScript and JNI for offline inference.
Key Decisions
- Used async queue architecture to handle variable inference load without blocking
- TorchScript + JNI for mobile deployment to avoid on-device Python runtime
- Sliding-window approach to handle images larger than model input resolution
Tech Stack
Python, Flask, PyTorch, RabbitMQ, AWS, OpenCV, ONNX, TorchScript, JNI.
Outcome
Production pipeline serving a healthcare-adjacent workflow with both cloud and mobile deployment paths.
Role
Built and maintained the full pipeline (API, queue, inference, deployment).
CTA
Interested in building something similar? Contact me.