42c80fd0fca4f5356f1149db4ad4b0fbd8457655
Feedmill Recounter
AI video analysis tool for counting objects (sacks, boxes) in feedmill videos. Built on top of karung_counter_semarang.
Features
- CLI: Process videos from the command line with any model + class filter
- Web UI: Upload videos, select models, download annotated output on port 9000
- Multiple Models: Run multiple model configurations on the same video for comparison
- Class Filtering: Choose which classes to count (sack, box, truck)
- Annotated Output: Download MP4 videos with detection overlays for human review
- Async Processing: Background job queue — upload and poll status
Quick Start
pip install -e ".[dev]"
# List available models
recounter --list-models --models-dir ./models
# Process a single video via CLI
recounter --video input.mp4 --model v4-best.pt --filter sack --output-dir ./output
# Start web UI
recounter-web
# Open http://localhost:9000
CLI Reference
recounter --video PATH Input video file
--model NAME Model filename (repeatable for multiple)
--all-models Run all discovered models
--list-models List available models and exit
--filter NAME Class filter (repeatable): sack, box, truck
--sack-conf FLOAT Sack confidence threshold (default: 0.4)
--truck-conf FLOAT Truck confidence threshold (default: 0.5)
--output PATH Output path (single model only)
--output-dir DIR Output directory (default: ./output)
--models-dir DIR Models directory (default: ./models)
Web UI
- Port: 9000 (configurable via
WEB_PORTenv) - Upload: Select video file
- Model Selection: Checkboxes for each model, dropdown for class filter
- Job Status: Auto-refreshing progress page
- Download: Annotated MP4 per model result
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Upload form with model selection |
/upload |
POST | Start processing job |
/status/<job_id> |
GET | Job status with results |
/jobs |
GET | All jobs listing |
/download/<job_id>/<filename> |
GET | Download output video |
/api/models |
GET | List available models |
/api/jobs |
GET | List all jobs (JSON) |
/api/jobs/<job_id> |
GET | Job detail (JSON) |
Project Structure
src/
├── interfaces.py # Detection dataclass + protocols
├── detection.py # YOLO detectors with class filtering
├── tracking.py # ByteTrack/FastTrack tracker
├── stabilizer.py # Bbox smoothing + occlusion hold
├── truck_roi.py # Truck ROI detection + EMA smoothing
├── counting.py # Line-crossing counter
├── batch.py # Batch lifecycle state machine
├── dashboard.py # Frame annotation overlay
├── video_writer.py # Annotated video writer
├── model_registry.py # Model discovery + class metadata
├── pipeline.py # Video processing pipeline
└── job.py # Async job queue
Description
Multi model AI counter with class filtering for feedmill recounting
583 KiB
0 Stars
1 Watchers
0 Forks
Languages
Python
72.1%
HTML
11.7%
JavaScript
8.6%
CSS
7.6%