visual-layer / fastdup

fastdup is a powerful free tool designed to rapidly extract valuable insights from your image & video datasets. Assisting you to increase your dataset images & labels quality and reduce your data operations costs at an unparalleled scale.
Other
1.56k stars 76 forks source link

[Bug]: fastdup.extract_video_frames crashes when work_dir path too long #175

Closed roi2405 closed 8 months ago

roi2405 commented 1 year ago

What happened?

Using fastdup.extract_video_frames crashes with the following error message: "Process finished with exit code -1073740791 (0xC0000409)" - according to google it indicates a corrupted file after I used the same video, but changed the input_dir and work_dir to a shorter path, it worked as expected.

What did you expect to see?

No response

What version of fastdup were you runnning on?

0.923

What version of Python were you running on?

Python 3.9

Operating System

Windows 10

Reproduction steps

running 'fastdup.extract_video_frames' with the 'work_dir' argument deep in the file explorer folders.

Relevant log output

C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe C:/Users/User/PycharmProjects/pocketcourse/experimental/roi/playing_with_fastdup.py
 [sentry] DEBUG: Setting up integrations (with default = False)
 [sentry] DEBUG: Setting SDK name to 'sentry.python'
FastDup Software, (C) copyright 2022 Dr. Amir Alush and Dr. Danny Bickson.
2023-04-28 18:12:15 [INFO] Version 0.923 Release compiled on Apr 28 2023 08:35:06
2023-04-28 18:12:15 [DEBUG] Read model file UndisclosedFastdupModel.ort input layer name input output layer name global_average_pooling2d_12
2023-04-28 18:12:15 [DEBUG] out_dims[0] = -1
2023-04-28 18:12:15 [DEBUG] out_dims[1] = 576
2023-04-28 18:12:15 [DEBUG] Model dimensions are -1 224 224 3 is_nchw? 0 is b/w? 0
2023-04-28 18:12:15 [INFO] Going to loop over dir C:\Users\User\PycharmProjects\pocketcourse\experimental\roi\video_data_examples\regular_show_example\data
2023-04-28 18:12:15 [DEBUG] Total images read so far 1
2023-04-28 18:12:15 [INFO] Found total 1 videos to run on, 1 train, 0 test, name list 1, counter 1 
2023-04-28 18:12:15 [DEBUG] Going to init pool
2023-04-28 18:12:15 [DEBUG] Starting to run with 8 threads
2023-04-28 18:12:15 [DEBUG] Going to init quad array of size 1
2023-04-28 18:12:15 [DEBUG] Going to init jobs
2023-04-28 18:12:15 [DEBUG] Run inference C:\Users\User\PycharmProjects\pocketcourse\experimental\roi\video_data_examples\regular_show_example\data\regular_show_episode.mp4 0 batch size 1

Process finished with exit code -1073740791 (0xC0000409)

Attach a screenshot [Optional]

No response

Contact Details [Optional]

roi2405@gmail.com

dbickson commented 1 year ago

Hi @roi2405 this is windows limitation, will investigate how to solve it, in the meantime, instead of using full path, change the working dir to the current folder, and use relative path. For example if your video file is in c:\\user\\roi\\video\\ you can os.chdir("c:\\user\\roi") and then run fastdup.extract_video_frames("video")

dbickson commented 8 months ago

Should work better in 1.72