Open fjk123456 opened 1 month ago
👋 Hello @fjk123456, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.
If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.
Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.
Pip install the ultralytics
package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.
pip install ultralytics
YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
What's out?
What's out? I don't know, either. I just want to ask what went wrong, or the way to predict video or rtsp stream in this way is wrong. Is there any other more elegant and convenient method?
I've met the same problem when detecting single images. The detection speed was around 20ms per image at first and became slower to about 200+ms per images. Here is my code for prediction:
I've met the same problem when detecting single images. The detection speed was around 20ms per image at first and became slower to about 200+ms per images. Here is my code for prediction:
problem sovled. set stream=True and then put the result in a loop
I set stream=True, but the time still hasn't changed.
I've met the same problem when detecting single images. The detection speed was around 20ms per image at first and became slower to about 200+ms per images. Here is my code for prediction:
problem sovled. set stream=True and then put the result in a loop
I can't load the image, can you post a simple code snippet? How to put the result in a loop
I've met the same problem when detecting single images. The detection speed was around 20ms per image at first and became slower to about 200+ms per images. Here is my code for prediction:
problem sovled. set stream=True and then put the result in a loop
I can't load the image, can you post a simple code snippet? How to put the result in a loop
just as the code I've put, set the root to the folder you put the images, after that add the following code to put the result in a loop:
for i in results: pass
This problem has not been solved yet. I wonder if it is possible that the temperature is rising and the GPU frequency is down?
Search before asking
Question
Why the reasoning speed of yolov8-seg is getting slower and slower? The average processing and inference time of the first half of the video is 100ms, and the second half suddenly becomes 200ms, sometimes even 500ms. Is it that resources have not been released? Or is there something wrong with me using it like this? ` def capture_video(cap, q, skip_frame=0): cnt = 0 while True: ret = cap.grab() if not ret: break cnt += 1 if skip_frame > 0: if cnt % skip_frame == 0: cnt = 0 ret, frame = cap.retrieve() if ret: q.put(frame) else: ret, frame = cap.retrieve() if ret: q.put(frame) cap.release()
def detect_img(q, model, out): cnt = 0 first_round = False is_drawed = False limit_obj = LIMIT_NUM_OBJ(5) while True: if not q.empty(): cnt = 0 first_round = True
从队列中获取帧
capture_thread = threading.Thread(target=capture_video, args=(cap, q)) show_thread = threading.Thread(target=detect_img, args=(q, yolov8, out)) capture_thread.start() show_thread.start()
`
Additional
No response