Spaces:
Runtime error
Runtime error
File size: 415 Bytes
ea8fe24 2aea7d6 4db6e83 86c0982 5b59f67 86c0982 4e4aa54 86c0982 4e4aa54 86c0982 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import torch
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
# Path to model
MODEL_PATH = "Model/EvoSEGA/evoSEGA.pt"
# Load YOLOv5 model
model = torch.hub.load("ultralytics/yolov5", "custom", path=MODEL_PATH, force_reload=True)
# Run inference
results = model("test.jpg")
# Print results
print(results.pandas().xyxy[0]) # Pandas dataframe
results.show() # Show image with detections
|