video_features
video_features copied to clipboard
Extraction from paths with the same filename are not supported
Currently, it is assumed that all user-specified files have distinct file names. However, it leads to unwanted behavior if a user extracts files from multiple folders, e.g.
dataset/
dog/
000.mp4
cat/
000.mp4
On a side note, it would be lovely to keep the folder structure, if any, during the save. Plus, model_name
and feature_type
should be a part of the path.
<output_path>/feature_type/(model_name/)<path_relative_to(os.common_path(list_of_paths))>
.
MWE:
python main.py flow_type="raft" \
feature_type=i3d \
device_ids="[0]" on_extraction="save_numpy" \
video_paths="[./todel/cat/000.mp4, ./todel/dog/000.mp4]"
ls ./output
python main.py flow_type="raft" \
feature_type=i3d \
device_ids="[0]" on_extraction="save_numpy" \
video_paths="[./todel/cat/000.mp4, ./todel/dog/000.mp4]"
Now it fails (and that's ok 😆 ).
I think video_paths
's behavior is normal because we are dealing with independent videos but not a dataset or a directory in this case.
I agree that it would be lovely to keep the folder structure, but this feature may correspond to a new parameter (e.g., video_dir
or video_dataset
).
Yes, it is. The problem was with the saving of the extracted features as they collide with other user-specified files if they are from different folders but have the same file name.
I agree that we may need a new parameter if a user wants to specify a folder, like a dataset.