Views
No views yet
person_detector_best.pt)fire_detector_best.pt)fire_specialist_best.pt)ultralytics library in Python:1from ultralytics import YOLO
2
3# Load the person detector
4person_model = YOLO("person_detector_best.pt")
5
6# Perform inference on an image or video stream
7results = person_model("path/to/cctv_frame.jpg")
8
9# Show or save the results
10results[0].show()
11results[0].save(filename="prediction.jpg")1results = person_model("rtsp://your_camera_ip/stream", stream=True)
2for r in results:
3 boxes = r.boxes # Bounding boxes
4 # Process detections...