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

How to implement for a video frame ? #16

Open
kartik1395 opened this issue Mar 2, 2021 · 1 comment
Open

How to implement for a video frame ? #16

kartik1395 opened this issue Mar 2, 2021 · 1 comment

Comments

@kartik1395
Copy link

kartik1395 commented Mar 2, 2021

Hi, once I set the transform, how can it be applied to a video frame ?

    transform = cvtransforms.Compose([

     cvtransforms.TenCrop((224)),

     cvtransforms.Resize(size=(-1, 256)])

What is the next step to apply it to the frame ?

@hityzy1122
Copy link
Owner

Hi, once I set the transform, how can it be applied to a video frame ?

    transform = cvtransforms.Compose([

     cvtransforms.TenCrop((224)),

     cvtransforms.Resize(size=(-1, 256)])

What is the next step to apply it to the frame ?

You can firstly load a single video frame with cv2 as a numpy array with the shape (H,W, 3) ,and then apply the transform to the array as the examples of official tutorials(https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html).

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

2 participants