I am reading a video file with OpenCV for image recognition where I'm just interested in 1 of 60 frames every second, so instead of capturing 60 frames before getting to the next one I thought I could speed up the code by setting frame position between each iteration
while (capture.isOpened()):
capture.set(cv2.CAP_PROP_POS_FRAMES, frame_count)
ret, frame = capture.read()
frame_count += round(fps)
if ret:
...
Run Code Online (Sandbox Code Playgroud)
However, when I do it this way the following errors keep spamming in the terminal:
[h264 @ …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用自己的模型遵循以下示例:
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_2 (InputLayer) (None, 150, 150, 3) 0
_________________________________________________________________
block1_conv1 (Conv2D) (None, 150, 150, 64) 1792
_________________________________________________________________
block1_conv2 (Conv2D) (None, 150, 150, 64) 36928
_________________________________________________________________
block1_pool (MaxPooling2D) (None, 75, 75, 64) 0
_________________________________________________________________
block2_conv1 (Conv2D) (None, 75, 75, 128) 73856
_________________________________________________________________
block2_conv2 (Conv2D) (None, 75, 75, 128) 147584
_________________________________________________________________
block2_pool (MaxPooling2D) (None, 37, 37, 128) 0
_________________________________________________________________
block3_conv1 (Conv2D) (None, 37, 37, 256) 295168
_________________________________________________________________
block3_conv2 (Conv2D) (None, 37, 37, …Run Code Online (Sandbox Code Playgroud)