Instructions to use pragadeeshv23/arm-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TF-Keras
How to use pragadeeshv23/arm-model with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy) # See https://github.com/keras-team/tf-keras for more details. from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("pragadeeshv23/arm-model") - Notebooks
- Google Colab
- Kaggle
| #!/usr/bin/env python3 | |
| """Quick model quality report.""" | |
| if __name__ == "__main__": | |
| from ultralytics import YOLO | |
| model = YOLO("best.pt") | |
| epoch = model.ckpt.get("epoch", "?") if hasattr(model, "ckpt") else "?" | |
| print(f"Epochs trained: {epoch}") | |
| metrics = model.val(data="dataset/data.yaml", imgsz=416, device=0, conf=0.001) | |
| print() | |
| print("=" * 50) | |
| print(" MODEL QUALITY REPORT") | |
| print("=" * 50) | |
| print(f" mAP@0.5: {metrics.box.map50:.4f} ({metrics.box.map50*100:.1f}%)") | |
| print(f" mAP@0.5:0.95: {metrics.box.map:.4f} ({metrics.box.map*100:.1f}%)") | |
| print(f" Precision: {metrics.box.mp:.4f} ({metrics.box.mp*100:.1f}%)") | |
| print(f" Recall: {metrics.box.mr:.4f} ({metrics.box.mr*100:.1f}%)") | |
| p, r = metrics.box.mp, metrics.box.mr | |
| f1 = 2 * p * r / (p + r) if (p + r) > 0 else 0.0 | |
| print(f" F1-score: {f1:.4f} ({f1*100:.1f}%)") | |
| print() | |
| print(" Per-class mAP@0.5:") | |
| for i, ap in enumerate(metrics.box.ap50): | |
| print(f" {model.names[i]:>20s}: {ap:.4f} ({ap*100:.1f}%)") | |
| print() | |
| print(f" Inference speed: {metrics.speed['inference']:.1f} ms/image") | |
| print("=" * 50) | |