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

Update dataset_classification.py #1599

Merged
merged 1 commit into from
Jan 27, 2021
Merged

Conversation

Zarand3r
Copy link
Contributor

@Zarand3r Zarand3r commented Jan 27, 2021

The indexing of 1 is incorrect. Given a path, it will think the file name is the first thing in the path. To be consistent with line 174 I simply replaced 1 with -1. But can also use os.path.basename(sample).split(".")[0]

I noticed this when I was using the feat_extract_pytorch.py in action_recognition, and tried to use my custom data paths in the txt file pointed to by VAL_ANNO_PATH in the configuration yaml files. My input was 4 videos, but my output was just 1 file because this bug caused all the output file paths to be the same path.

The indexing of 1 is incorrect. Given a path, it will think the file name is the first thing in the path. To be consistent with line 174 I simply replaced 1 with -1. But can also use os.path.basename(sample).split(".")[0]

I noticed this when I was using the feat_extract_pytorch.py in action_recognition, and tried to use my custom data paths in the txt file pointed to by VAL_ANNO_PATH in the configuration yaml files.
@github-actions
Copy link

Job PR-1599-66edcc7 is done.
Docs are uploaded to http://gluon-vision-staging.s3-website-us-west-2.amazonaws.com/PR-1599/66edcc7/index.html

@bryanyzhu bryanyzhu self-assigned this Jan 27, 2021
@bryanyzhu
Copy link
Collaborator

Thank you for catching this, will merge it.

@bryanyzhu bryanyzhu merged commit 7f597e1 into dmlc:master Jan 27, 2021
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

Successfully merging this pull request may close these issues.

2 participants