Views
No views yet
drone1from ultralytics import YOLO
2from huggingface_hub import hf_hub_download
3
4# Download the model
5model_path = hf_hub_download(
6 repo_id="rujutashashikanjoshi/yolo12-drone-detection-0205_full-100m",
7 filename="best.pt"
8)
9
10# Load the model
11model = YOLO(model_path)
12
13# Run inference
14results = model("your_image.jpg")
15
16# Process results
17for result in results:
18 boxes = result.boxes # Boxes object for bbox outputs
19 print(f"Found {len(boxes)} detections")1from ultralytics import YOLO
2
3# Load from HuggingFace
4model = YOLO("hf://rujutashashikanjoshi/yolo12-drone-detection-0205_full-100m/best.pt")
5
6# Run inference
7results = model.predict("image.jpg", conf=0.5)
8
9# Display results
10results[0].show()best.pt: Best model checkpoint (highest mAP)last.pt: Last model checkpointconfig.json: Model configurationclass_names.txt: List of detection classesresults.csv: Training metrics over epochs*.png: Training plots and visualizationsresults.csv and visualized in the training plots.1@software{YOLOv12_ultralytics,
2 author = {Jocher, Glenn},
3 title = {Ultralytics YOLOv12},
4 year = {2023},
5 url = {https://github.com/ultralytics/ultralytics}
6}