beethogedeon/Trucks-Detection-Yolov8
Updated • 144 • 2
How to use varunm2004/yolov8x.pt with ultralytics:
from ultralytics import YOLOvv8
model = YOLOvv8.from_pretrained("varunm2004/yolov8x.pt")
source = 'http://images.cocodataset.org/val2017/000000039769.jpg'
model.predict(source=source, save=True)This is a YOLOv8x model trained on the duality-robotics/YOLOv8-Multiclass-Object-Detection-Dataset. The model is designed to detect multiple classes in images and videos with high accuracy.
You can use this model directly with the Hugging Face Inference API or deploy it to your own infrastructure.
import requests
API_URL = "https://huggingface.co/proxy/api-inference.huggingface.co/models/varunm2004/yolov8x"
headers = {"Authorization": f"Bearer YOUR_HUGGINGFACE_TOKEN"}
def query(filename):
with open(filename, "rb") as f:
data = f.read()
response = requests.post(API_URL, headers=headers, files={"file": data})
return response.json()
output = query("example.jpg")
print(output)
Unable to build the model tree, the base model loops to the model itself. Learn more.