Spaces:
Sleeping
Sleeping
Docs: expand README with usage, API, and deployment notes
Browse files
README.md
CHANGED
|
@@ -235,6 +235,7 @@ docker run --rm \
|
|
| 235 |
```
|
| 236 |
|
| 237 |
Notes:
|
|
|
|
| 238 |
- The Dockerfile uses `pytorch/pytorch:2.7.0-cuda12.6-cudnn9-runtime` as base (CUDA included).
|
| 239 |
- The app auto-selects GPU if available and performs a warm-up pass.
|
| 240 |
- Verify GPU is visible inside the container with `python -c "import torch; print(torch.cuda.is_available())"`.
|
|
@@ -307,6 +308,42 @@ Error responses include detailed error messages:
|
|
| 307 |
}
|
| 308 |
```
|
| 309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
## π Security & Privacy
|
| 311 |
|
| 312 |
- **No Data Storage**: Images/videos are processed in memory only
|
|
|
|
| 235 |
```
|
| 236 |
|
| 237 |
Notes:
|
| 238 |
+
|
| 239 |
- The Dockerfile uses `pytorch/pytorch:2.7.0-cuda12.6-cudnn9-runtime` as base (CUDA included).
|
| 240 |
- The app auto-selects GPU if available and performs a warm-up pass.
|
| 241 |
- Verify GPU is visible inside the container with `python -c "import torch; print(torch.cuda.is_available())"`.
|
|
|
|
| 308 |
}
|
| 309 |
```
|
| 310 |
|
| 311 |
+
## Accessing the API
|
| 312 |
+
|
| 313 |
+
**Health check**
|
| 314 |
+
|
| 315 |
+
```bash
|
| 316 |
+
curl https://algoryn-yolo-e-idcard.hf.space/health
|
| 317 |
+
```
|
| 318 |
+
|
| 319 |
+
**Image detection**
|
| 320 |
+
|
| 321 |
+
```bash
|
| 322 |
+
curl -X POST "https://algoryn-yolo-e-idcard.hf.space/v1/id/detect" \
|
| 323 |
+
-F "file=@your_image.jpg" \
|
| 324 |
+
-F "min_confidence=0.5" \
|
| 325 |
+
-F "return_crops=false"
|
| 326 |
+
```
|
| 327 |
+
|
| 328 |
+
**Video Detection**
|
| 329 |
+
|
| 330 |
+
```bash
|
| 331 |
+
curl -X POST "https://algoryn-yolo-e-idcard.hf.space/v1/id/detect-video" \
|
| 332 |
+
-F "file=@your_video.mp4" \
|
| 333 |
+
-F "min_confidence=0.5" \
|
| 334 |
+
-F "sample_fps=2.0" \
|
| 335 |
+
-F "max_detections=10" \
|
| 336 |
+
-F "return_crops=false"
|
| 337 |
+
```
|
| 338 |
+
|
| 339 |
+
## π― Test Results Summary
|
| 340 |
+
|
| 341 |
+
- β
Health Check: Space is healthy and running version 2.0.0
|
| 342 |
+
- β
Image Detection: Successfully detected identity cards in test images
|
| 343 |
+
- β
Video Detection: Processed 8 frames and found 10 detections with tracking
|
| 344 |
+
- β
Performance: ~1.1s for images, ~3.3s for videos
|
| 345 |
+
- β
Quality Metrics: Comprehensive quality assessment working
|
| 346 |
+
|
| 347 |
## π Security & Privacy
|
| 348 |
|
| 349 |
- **No Data Storage**: Images/videos are processed in memory only
|