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

modified source path of moving, so that it can find UCF-101 dataset #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ideaRunner
Copy link

Hi Matt Harvey,

In 1_move_files.py , the filename is only the video file name. it doesn't contain the path of UCF dataset and classname path. That is the reason that when run it, it returns "Can't find xxx to move. Skipping xxx."

I modified

            if not os.path.exists(filename):
                print("Can't find %s to move. Skipping." % (filename))
                continue

            # Move it.
            dest = os.path.join(group, classname, filename)
            print("Moving %s to %s" % (filename, dest))
            os.rename(filename, dest)

to

            src = os.path.join("UCF-101", classname, filename)
            if not os.path.exists(src):
                print("Can't find %s to move. Skipping." % (src))
                continue

            # Move it.
            dest = os.path.join(group, classname, filename)
            print("Moving %s to %s" % (src, dest))
            os.rename(src, dest)

This way others don’t need to modify it again.

@orapradeep
Copy link

also change line "parts = video.split(os.path.sep)"
to "parts = video.split('/')"

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