PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

打架检测任务会进入死循环卡在20帧

Open mytangyh opened this issue 2 years ago • 4 comments

问题确认 Search before asking

  • [X] 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

Bug组件 Bug Component

Deploy

Bug描述 Describe the Bug

正常运行时10帧或者20帧后就会直接进入循环出不来,单步调试不会进入循环


def capturevideo(self, capture, queue):        
    frame_id = 0        
    while (1):            
        if queue.full():                
            time.sleep(0.1)            
        else:                
            ret, frame = capture.read()                
            if not ret:
            return  
            frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
            queue.put(frame_rgb)

image

复现环境 Environment

-OS: Linux -PaddlePaddle:2.6 -PaddleDection:release/2.4 -Python:3.7.0 -CUDA:11.2

Bug描述确认 Bug description confirmation

  • [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • [x] 我愿意提交PR!I'd like to help by submitting a PR!

mytangyh avatar May 05 '23 12:05 mytangyh

遇到一样的问题 video fps: 10, frame_count: 335 Thread: 0; frame id: 0 save result to output/test1.mp4 ------------------ Inference Time Info ---------------------- total_time(ms): 0.0, img_num: 0 average latency time(ms): 0.00, QPS: 0.000000

yemuzi avatar May 10 '23 06:05 yemuzi

我也遇到了同样的问题,请问你解决了吗?

LSun0717 avatar May 18 '23 06:05 LSun0717

我也遇到了同样的问题,请问你解决了吗?

用release/2.5的

mytangyh avatar May 18 '23 11:05 mytangyh

本地离线数据的话,可以把framequeue = queue.Queue(10)改成framequeue = queue.Queue(maxsize=0); 如果是拉流检测话,主循环有逻辑bug,当视频解码时间>检测时间时,栈中无帧,检测中断,需要改主循环while (not framequeue.empty()):,改为只要视频流指定的摄像头在开启状态下,检测不停。

Qinziqi1996 avatar Apr 24 '24 01:04 Qinziqi1996