Google Colab cv2_imshow(image) does not work while running scripts

Viewed 32

I'm running a script with those command line arguments:

! python run.py --video ./data/video/vid.mp4 --output ./outputs/vid.mp4 --model yolov4

but it seems like the code below does not work:

 flags.DEFINE_boolean('dont_show', False, 'dont show video output')

 result = np.asarray(frame) # type of frame is 'numpy.ndarray'
    result = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)
    
 if not FLAGS.dont_show:
    cv2_imshow(result)

Instead, it outputs this

0 Answers
Related