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

When I open the folder there is more than 16 images. #33

Open
HorusMaster opened this issue Aug 5, 2019 · 2 comments
Open

When I open the folder there is more than 16 images. #33

HorusMaster opened this issue Aug 5, 2019 · 2 comments

Comments

@HorusMaster
Copy link

clip_len (int): Determines how many frames are there in each clip. Defaults to 16. But when I open the folder of the preprocessed video I see more than 16 images, somentimes 32 or 40

@HuangZuShu
Copy link

I think “default to 16” refers to only crop 16 frame. From the following code , you may see it.

    def crop(self, buffer, clip_len, crop_size):
        # randomly select time index for temporal jittering
        time_index = np.random.randint(buffer.shape[0] - clip_len)

        # Randomly select start indices in order to crop the video
        height_index = np.random.randint(buffer.shape[1] - crop_size)
        width_index = np.random.randint(buffer.shape[2] - crop_size)

        # Crop and jitter the video using indexing. The spatial crop is performed on
        # the entire array, so each frame is cropped in the same location. The temporal
        # jitter takes place via the selection of consecutive frames
        buffer = buffer[time_index:time_index + clip_len,
                 height_index:height_index + crop_size,
                 width_index:width_index + crop_size, :]

        return buffer

@Cli98
Copy link

Cli98 commented Dec 14, 2020

clip_len (int): Determines how many frames are there in each clip. Defaults to 16. But when I open the folder of the preprocessed video I see more than 16 images, somentimes 32 or 40

No. What you discussed is the result in preprocessing. At that stage, cropping does not apply.

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

No branches or pull requests

3 participants