Code Monkey home page Code Monkey logo

Comments (17)

joaoluiscarreira avatar joaoluiscarreira commented on June 22, 2024 2

from kinetics-i3d.

YongyiTang92 avatar YongyiTang92 commented on June 22, 2024 1

Ping! Any update on this?

I found that the pretrained model work better with the flow images which are extracted after resizing the rgb frames.
And I used OpenCV3.3 (or 4.0 may work) instead of 3.4 since I found there some difference for the cv::cuda::OpticalFlowDual_TVL1.
I have got compatible accuracy for the fusion results while the flow results is still slightly worse.

from kinetics-i3d.

salmedina avatar salmedina commented on June 22, 2024

Ping! Any update on this?

from kinetics-i3d.

salmedina avatar salmedina commented on June 22, 2024

Thank you very much for the feedback. This is helpful. I'll look into that.

from kinetics-i3d.

dreichCSL avatar dreichCSL commented on June 22, 2024

Has anyone tried calculating optical flow using python opencv? I can't seem to get good results with that preprocessing, but might also be my lack of understing about parameters to use. I'm using opencv 4.1.0:
optical_flow = cv2.optflow.createOptFlow_DualTVL1()
flow_frame = optical_flow.calc(prev, curr, None)
flow_frame = np.clip(flow_frame, -20, 20)
flow_frame = flow_frame / 20.0

Thanks for any comments!

from kinetics-i3d.

dreichCSL avatar dreichCSL commented on June 22, 2024

Actually, the code I used above works fine and produces good results on the example vid. But would still be nice to get pointers if this is missing something from the original preprocessing. Thanks

from kinetics-i3d.

YongyiTang92 avatar YongyiTang92 commented on June 22, 2024

Actually, the code I used above works fine and produces good results on the example vid. But would still be nice to get pointers if this is missing something from the original preprocessing. Thanks

I think your code is correct. But the python interface is too slow. Do you have any idea how to speedup? Actually, I used the C++ interface of OpenCV for flow extraction.

from kinetics-i3d.

dreichCSL avatar dreichCSL commented on June 22, 2024

Yes, it's slow, on my desktop flow calc runs at about 4 fps. I just wanted to reproduce for now. Don't know if it's possible to bring it up to 25 fps with Python - I'd guess that it isn't. Is the speed fine with C++?

from kinetics-i3d.

skaws2003 avatar skaws2003 commented on June 22, 2024

Hello, does anyone know how the frame sampling was done? Is it just nearest sampling?

from kinetics-i3d.

skaws2003 avatar skaws2003 commented on June 22, 2024

Yes, it's slow, on my desktop flow calc runs at about 4 fps. I just wanted to reproduce for now. Don't know if it's possible to bring it up to 25 fps with Python - I'd guess that it isn't. Is the speed fine with C++?

it is fine with C++. it runs at about 40~50fps on 2080ti with the opencv cuda interface.

from kinetics-i3d.

zehzhang avatar zehzhang commented on June 22, 2024

Hello, does anyone know how the frame sampling was done? Is it just nearest sampling?

Hi do you have any ideas? I am also wondering how the video resampling is done...

from kinetics-i3d.

dreichCSL avatar dreichCSL commented on June 22, 2024

Just to reply to the resampling question: This is what I did to my videos which were originally 1280x720 and 30fps (using ffmpeg on ubuntu command line):

ffmpeg -y -r 30 -i input.avi -r 25 -filter:v scale=456x256 -sws_flags bilinear output.avi

Output of this should be a bilinearly interpolated video with 25fps and smaller side of video at 256px, as described in the paper and/or README file.

from kinetics-i3d.

ss-github-code avatar ss-github-code commented on June 22, 2024

Hi Joao,

the preprocessing code has been released as part of mediapipe, see here:
https://github.com/google/mediapipe/tree/master/mediapipe/examples/desktop/media_sequence

If I follow the steps and use kinetics_dataset.py on v_CricketShot_g04_c01,avi, I do not get rgb and flow files. Please do elaborate on how to preprocess the avi file to generate the rgb and flow data.

Thanks for your help

from kinetics-i3d.

joaoluiscarreira avatar joaoluiscarreira commented on June 22, 2024

from kinetics-i3d.

ss-github-code avatar ss-github-code commented on June 22, 2024

Thanks Joao,
Just to clarify, I am following the steps outlined under "custom videos in the Kinetics format". I change VIDEO_PATH to point to the avi, build the media_sequence_demo and run kinetics_dataset.py. I do see an output file kinetics_700_custom_25fps_rgb_flow-00000-of-00001. I am not sure about the next step.

from kinetics-i3d.

ss-github-code avatar ss-github-code commented on June 22, 2024

I was hoping that it will generate the rgb & flow files in a format that I can then use as an input to evaluate_sample. Not sure if that is the intent of the release of the preprocessing code.

from kinetics-i3d.

joaoluiscarreira avatar joaoluiscarreira commented on June 22, 2024

from kinetics-i3d.

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.