Instructions to use tillsc/perp-cnn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use tillsc/perp-cnn with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("tillsc/perp-cnn") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
| library_name: ultralytics | |
| tags: | |
| - object-detection | |
| - yolo | |
| - ultralytics | |
| license: mit | |
| # perp-cnn — Bowtip Detection | |
| Detects the bow tip of boats in photofinish images. Used in [perp_web](https://github.com/tillsc/perp_web) for automated boat race timing. | |
| ## Usage | |
| ```python | |
| import numpy as np | |
| from perp_cnn import predict | |
| image: np.ndarray = ... # H×W×3, BGR or RGB | |
| results = predict(image) | |
| for box in results[0].boxes: | |
| x1, y1, x2, y2 = map(int, box.xyxy[0]) | |
| conf = float(box.conf[0]) | |
| ``` | |
| Or install as a Git dependency via Poetry: | |
| ```toml | |
| perp-cnn = { git = "https://github.com/tillsc/perp_cnn.git" } | |
| ``` | |
| ## Model | |
| - Architecture: YOLO11n | |
| - Input: arbitrary image size (resized to 640px internally) | |
| - Output: bounding boxes for class `bowtip` | |
| - Training data: photofinish images from rowing races | |
| ## Performance | |
| | | | | |
| |---|---| | |
| | Precision | 100% | | |
| | Recall | 97.9% | | |
| | Box accuracy (mAP50) | 99.5% | | |
| | Box precision (mAP50-95) | 74.6% | | |
| | CPU inference | ~19ms / ~52 FPS | | |
| ## Training Notes | |
| - No horizontal or vertical flips (boat orientation matters) | |
| - No rotation or perspective warp | |
| - Slight translation and scaling augmentation | |