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

Extraction from paths with the same filename are not supported #54

Open
v-iashin opened this issue Aug 18, 2022 · 4 comments
Open

Extraction from paths with the same filename are not supported #54

v-iashin opened this issue Aug 18, 2022 · 4 comments
Assignees
Labels
idea for contribution An idea for contribution

Comments

@v-iashin
Copy link
Owner

v-iashin commented Aug 18, 2022

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))>.

@v-iashin v-iashin added the bug Something isn't working label Aug 18, 2022
@v-iashin v-iashin self-assigned this Aug 18, 2022
@v-iashin
Copy link
Owner Author

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

@v-iashin
Copy link
Owner Author

v-iashin commented Aug 18, 2022

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 😆 ).

@v-iashin v-iashin added idea for contribution An idea for contribution and removed bug Something isn't working labels Aug 18, 2022
@Kamino666
Copy link
Contributor

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).

@v-iashin
Copy link
Owner Author

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.

@v-iashin v-iashin changed the title Common file names will save features to the same file Extraction from paths with the same filename are not supported Aug 20, 2022
f1ibrahim-tmu pushed a commit to f1ibrahim-tmu/video_features that referenced this issue Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea for contribution An idea for contribution
Projects
None yet
Development

No branches or pull requests

2 participants