Giter Club home page Giter Club logo

Comments (10)

yjxiong avatar yjxiong commented on July 21, 2024 1

No modification. For Caffe style models, we do not perform the division either.

from tsn-pytorch.

cmhungsteve avatar cmhungsteve commented on July 21, 2024

and I found that:

self.input_mean = [0.485, 0.456, 0.406] + [0] * 3 * self.new_length
self.input_std = self.input_std + [np.mean(self.input_std) * 2] * 3 * self.new_length

It seems that for each stack, the way you normalize the first frame is different from the other frames. Is there any reason not to normalize in the same way?

Thank you.

from tsn-pytorch.

yjxiong avatar yjxiong commented on July 21, 2024
  1. RGBdiff is calculated by subtracting consecutive frames. There is no need for subtracting means on frames beforehand. We mostly experimented with Caffe style models so the pixels are used as is. If you need Torch-style input you may add the scaling back.

  2. These lines are not used as described in 1. But I think it is a good idea do a clean-up of the code to remove the confusing parts.

from tsn-pytorch.

cmhungsteve avatar cmhungsteve commented on July 21, 2024

That makes sense. Thank you for clarifying.
So what you're saying is that for the RGBDiff model, we only need to divide the frame values by std (no need for subtracting mean). Is that correct?

from tsn-pytorch.

yjxiong avatar yjxiong commented on July 21, 2024

Yes. Subtracted means will be removed in computing differences. So there is no need to do it beforehand.

from tsn-pytorch.

cmhungsteve avatar cmhungsteve commented on July 21, 2024

One more question about the std. Did you just divide by the original input_std for the RGBDiff model? Or you did some modification on it?

Thanks.

from tsn-pytorch.

cmhungsteve avatar cmhungsteve commented on July 21, 2024

I saw you have an argument keep_rgb for the RGBDiff model and set as False. What's the performance if you set keep_rgb as True? And how did you normalize that since you have both RGB and RGBDiff for inputs?
Thanks.

from tsn-pytorch.

yjxiong avatar yjxiong commented on July 21, 2024

It is just a simple trial without too much investigation, where we found marginal improvement. Perhaps its due to we only keep the first frame's RGB. We subtract means on the kept RGB. You are free to experiment with your own normalization.

from tsn-pytorch.

gwh0112 avatar gwh0112 commented on July 21, 2024

@yjxiong hi,
For generating the RGB diff images as the input to train the flow branch, you said we just directly subtract two consecutive frames. Does that mean, for example, I want to generate all the input images (frames, optical flow, rgb diff) from dense_flow code, I added the following in the dense_flow_gpu.cpp:

image_diff = capture_image - prev_image;
imencode(".jpg", image_diff, str_img);

Is this the correct way to generate the diff image? Do we need to set any bound (like optical flow one) to normalize the image_diff (-255255) to (0255) in dense_flow_gpu.cpp code?
After storing all the diff images, we run the RGB diff script to train the RGB diff branch, right?

Many thanks.

from tsn-pytorch.

yjxiong avatar yjxiong commented on July 21, 2024

@gwh0112
No. RGBDiff is generated on the fly during training. We can find the code for this cause in the repo.

from tsn-pytorch.

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.