Giter VIP home page Giter VIP logo

Comments (5)

mmaaz60 avatar mmaaz60 commented on September 14, 2024

Hi @Nastu-Ho,

Thank you for your interest in our work. We sample 100 frames uniformly during both training and testing. Thank you

from video-chatgpt.

onlyonewater avatar onlyonewater commented on September 14, 2024

@mmaaz60 , hi, can I sample more than 100 frames to infer on my own dataset?

from video-chatgpt.

onlyonewater avatar onlyonewater commented on September 14, 2024

from #14, I know how to change the code, but how to change the code to extract the 1 frame or 2 frames per second? I think this implementation makes sense for long videos.

from video-chatgpt.

mmaaz60 avatar mmaaz60 commented on September 14, 2024

Hi @onlyonewater,

It would be something similar to below,

sample_fps = 1 

vr = VideoReader(video_path, ctx=cpu(0))
fps = vreader.get_avg_fps()
f_start = 0
f_end = len(vr) - 1
t_stride = int(round(float(fps) / sample_fps))
all_pos = list(range(f_start, f_end + 1, t_stride))
img_array = vr.get_batch(all_pos).asnumpy()

I hope this will be helpful. Thank YOu

from video-chatgpt.

onlyonewater avatar onlyonewater commented on September 14, 2024

ok, I got it, thanks @mmaaz60

from video-chatgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.