A complete deep learning solution for detecting and segmenting manufacturing defects with state-of-the-art accuracy. Designed for industrial quality control systems.
- High-Precision Segmentation: 0.92+ mIoU accuracy
- Production-Ready: FastAPI API and Docker support
- Optimized Models: ONNX/TensorRT compatible
- Real-Time Processing: <50ms inference on GPU
- Comprehensive Training: Full pipeline from data to deployment
# Base installation
pip install industrial-defect-segmentation
# With GPU support
pip install "industrial-defect-segmentation[gpu]"from industrial_defect_segmentation import DefectDetector
# Initialize detector
detector = DefectDetector("models/resnet18-unet.pth")
# Run inference
results = detector.detect("sample.jpg")
print(f"Found {len(results.defects)} defects")python -m industrial_defect_segmentation.demoStart the FastAPI server for real-time defect detection:
uvicorn industrial_defect_segmentation.api:app --host 0.0.0.0 --port 8000After starting the API server, send an image for defect detection:
curl -X POST "http://localhost:8000/predict" -F "file=@sample.jpg"| Model | mIoU | Inference Time (T4 GPU) | Memory Usage |
|---|---|---|---|
| ResNet18-UNet | 0.89 | 45ms | 1.2GB |
| EfficientNetB0 | 0.91 | 55ms | 1.5GB |
| MobileNetV3 | 0.87 | 28ms | 0.8GB |
from industrial_defect_segmentation import Trainer
trainer = Trainer(
backbone="resnet34",
train_data="data/train",
val_data="data/val"
)
trainer.train(epochs=50)pytest tests/MIT License - See LICENSE for details.
Developed with ❤️ by Tanvir Kabir Shaon
AI Solutions for Industrial Automation
