Work / AI Vision · YOLO · SAM
NeuralVision Pro
Real-time object detection and segmentation system based on YOLO and SAM, designed for industrial quality inspection with multi-class defect identification and pixel-level segmentation.
- Independent Developer
- 4 months
- 3 People
- No. 12

YOLO + SAM Industrial Inspection System
NeuralVision Pro is a visual inspection system for industrial quality control, using YOLOv8 for high-speed object detection combined with SAM (Segment Anything Model) for pixel-level defect segmentation. The system supports multiple industrial inspection scenarios including surface scratches, foreign object contamination, and dimensional deviations.
Through YOLO's rapid detection cascaded with SAM's precise segmentation, the system achieves sub-20ms end-to-end inference latency while maintaining detection accuracy. Built with Python + PyTorch, Flask backend, MySQL storage, and Docker containerization, it has been successfully validated across multiple real-world inspection scenarios.
Architecture
End-to-end technology selection from model training to service deployment
Core Capabilities
Performance Metrics
- 15ms
- 95%
- 3+
- 50K+
Inference Pipeline
YOLO detection + SAM segmentation cascaded inference pipeline
from ultralytics import YOLO
from segment_anything import sam_model_registry, SamPredictor
import cv2
# Initialize YOLO detector and SAM predictor
yolo = YOLO("yolov8m.pt")
sam = sam_model_registry["vit_h"](checkpoint="sam_vit_h.pth")
predictor = SamPredictor(sam)
# Step 1: YOLO detection
image = cv2.imread("defect_sample.jpg")
results = yolo.predict(image, conf=0.7)
boxes = results[0].boxes.xyxy.cpu().numpy()
# Step 2: SAM segmentation on detected regions
predictor.set_image(image)
masks, _, _ = predictor.predict(
box=boxes[0], # use first detection as prompt
multimask_output=True
)
print(f"Detected {len(boxes)} defects, mask shape: {masks.shape}")