Skip to content

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