SensorsINI / v2e

V2E: From video frames to DVS events
https://sites.google.com/view/video2events/home
MIT License
286 stars 50 forks source link

How to get the same number of pictures back #73

Closed MR-Vico closed 6 days ago

MR-Vico commented 1 week ago

I hope someone here can help me.

I want to use v2e to synthesize a dataset. I use this command:

“python3 ../v2e/v2e.py -i {input_mov} -o {output_dvs_video} --output_width=346 --output_height=260 --disable_slomo --no_preview --dvs_exposure duration 0.03333333333”

Unfortunately, I do not get back the exact number of images contained in the video. For example, if there are 2885 images in the video, I get 2887 images. I am aware that this is due to the duration value and the resulting rounding. I need to be able to use V2E and get back the same number of images as are supplied in the input.

Can someone tell me what the command to call the program must be. I can't find in the documentation how to get back the exact same number of synthetic images. I have also tried “--dvs_exposure source”, but I only get about 350 images instead of 2885.

Thanks in advance

tobidelbruck commented 1 week ago

Not sure about this, have you tried debugger?

In principle you can only get a DVS accumulated-events frame that ends on an input image and generates events from the change since last image. Therefore you should only get one less output frame. I.e. 3 input frames should only make 2 output event frames. I don't have time to debug now. Maybe you can just inspect and chop off either first or last frames.

BTW, this is not really the intent of event cameras to run at the source camera frame rate. It obviates the entire idea that perception should be driven by activity, not some fixed Nyquist rate. Just saying this because there are moles of papers now that seem to not realize this fundamental concept.