conf and show in terminal #17680
Replies: 2 comments
-
👋 Hello @mickycooky, thank you for engaging with the Ultralytics community 🚀! We recommend taking a look at our comprehensive Documentation where you can find extensive usage guides and examples for both Python and CLI. For your questions:
Don't forget to join the broader Ultralytics community for real-time support or discussions. Feel free to jump into our Discord 🎧, explore more in-depth conversations in Discourse, or visit our Subreddit for knowledge-sharing. UpgradeEnsure you're on the latest release as many improvements and bug fixes are regularly made: pip install -U ultralytics Available EnvironmentsYOLO can be set up in various verified environments preloaded with dependencies:
StatusOur CI badge reflects the current status of functionality testing across platforms. If green, all tasks and modes are running well. Please note that this is an automated response and an Ultralytics engineer will soon review your query. Thank you for your patience and contribution to our community! 😊 |
Beta Was this translation helpful? Give feedback.
-
@mickycooky to adjust the confidence score, you can set the |
Beta Was this translation helpful? Give feedback.
-
i have two questions about this program.
import cv2
from ultralytics import solutions
cap = cv2.VideoCapture("path/to/video/file.mp4")
assert cap.isOpened(), "Error reading video file"
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
Define region points
region_points = [(20, 400), (1080, 400)] # For line counting
region_points = [(20, 400), (1080, 404), (1080, 360), (20, 360)] # For rectangle region counting
region_points = [(20, 400), (1080, 404), (1080, 360), (20, 360), (20, 400)] # For polygon region counting
Video writer
video_writer = cv2.VideoWriter("object_counting_output.avi", cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
Init Object Counter
counter = solutions.ObjectCounter(
show=True, # Display the output
region=region_points, # Pass region points
model="yolo11n.pt", # model="yolo11n-obb.pt" for object counting using YOLO11 OBB model.
# classes=[0, 2], # If you want to count specific classes i.e person and car with COCO pretrained model.
# show_in=True, # Display in counts
# show_out=True, # Display out counts
# line_width=2, # Adjust the line width for bounding boxes and text display
)
Process video
while cap.isOpened():
success, im0 = cap.read()
if not success:
print("Video frame is empty or video processing has been successfully completed.")
break
im0 = counter.count(im0)
video_writer.write(im0)
cap.release()
video_writer.release()
cv2.destroyAllWindows()
i want to know score and setting conf⚠️ no tracks found!
and in terminal,
0: 384x640 (no detections), 2.3ms
Speed: 0.5ms preprocess, 2.3ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)
WARNING
i want to off this↑
Beta Was this translation helpful? Give feedback.
All reactions