Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In build_dataset.py (all_frames error) #5

Open
chahatagarwal opened this issue Apr 22, 2020 · 1 comment
Open

In build_dataset.py (all_frames error) #5

chahatagarwal opened this issue Apr 22, 2020 · 1 comment

Comments

@chahatagarwal
Copy link

In capture_process_frames function, it will not be able to manage more than 29 frames, hence have a condition check or push it under try block! Check the Code below

while vidObj.isOpened():
success, image = vidObj.read()
if success :
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
image = resize_frame(image, size_frame-180, offset=35)
image = cv2.resize(image, dsize=(size, size), interpolation=cv2.INTER_LINEAR)
try:
all_frames[countsize:size(count+1), :] = image
except:
break
count += 1

@chahatagarwal
Copy link
Author

In capture_process_frames function, it will not be able to manage more than 29 frames, hence have a condition check or push it under try block! Check the Code below

while vidObj.isOpened():
success, image = vidObj.read()
if success :
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
image = resize_frame(image, size_frame-180, offset=35)
image = cv2.resize(image, dsize=(size, size), interpolation=cv2.INTER_LINEAR)
try:
all_frames[count_size:size_(count+1), :] = image
except:
break
count += 1

You can execute this script using below command:
python build_dataset.py --data_dir data/ --output_dir output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant