-
Notifications
You must be signed in to change notification settings - Fork 54
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
The different number of the output event frames as the original input frames. #57
Comments
Would also like this answered. Thanks |
Without looking at code I guess that there is one less output frame than
input frame because there are no events from first input frame, and
probably no events output from last input frame... but I'm not sure. Can
you put a debug point in the code to check it?
|
@tobidelbruck that makes sense to me if the events are generated using the difference between consecutive frames. Generating log intensity images on pairs of frames would produce 2 less frames by design. I suppose to get equal number of frames to the input one could use the --hdr and supply our own log intensity frames? |
That's not quite correct. You do not get an events from first frame
because that is used to initialize pixel memory of log intensity. Each
subsequent input frame should generate events from the changes.
|
Yes, I find the first and last frames lack corresponding output events through debugging. Why there is no corresponding event for the two frames. |
Hi, I guess you used frames to generate events. That's what I want to do. I read v2e tutorials but it seems it just shows how to generate events from videos. So if I want to use frames to get events, how should I do? |
I recall we had an option to read videos from a folder of frames. Please
check if that still works correctly.
```
Input file handling:
-i INPUT, --input INPUT
Input video file or a image folder; leave empty for
file chooser dialog.If the input is a folder, the
folder should contain a ordered list of image
files.In
addition, the user has to set the frame rate
manually.
```
|
I try to use the v2e_tutorial.ipynb on Colaboratory to get events from a list of frames. I uploaded a zip named "motion.zip" which contains 20 continuous frames and changed the "video_path" to "/content/motion.zip". It seemed not to work after running "final_v2e_command" and went wrong. The error log is below: "INFO:v2e:torch device is cuda WARNING:v2ecore.v2e_args: INFO:v2ecore.v2e_args:DVS frame expsosure mode ExposureMode.DURATION: frame rate 30.3030303030303 OpenCV(4.8.0) /io/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): /content/motion_frames.zip in function 'icvExtractPattern' INFO:v2e:Input video frame rate 0.0Hz is overridden by command line argument --input_frame_rate=30.0 INFO:v2ecore.emulator:ON/OFF log_e temporal contrast thresholds: 0.2 / 0.2 +/- 0.03 |
@jinzi98 I see the input is a zip file, v2e doesn't read zip, you need to unzip it first or group your frames into a video yourself. |
Thanks a lot! That does help! I unzipped the frames and sent the frames file to "video_path". It ran successfully, and I got events.h5 file. The .h5 file shape is (1760862, 4), and I guess it means 1760862 events with h, w, time_stample, and luminance change. Here I need help. I will use event information in my deep learning task so I want to change the events into the format I can use, like frames, and let their resolution and number like the frames' I put in. For example, I put in 20 frames, and every frame's shape is (720, 480, 3). After v2e, I want to get 19 event frames with (720, 480, x) shape. What do you think I should do? Hope for your reply. |
Please, did you solve the problem of the difference in the number of input and output frames? |
That's not a problem. You can think one output frame is in the middle of two continuous input frames. So the outputs is 1 less inputs. |
How should we configure the parameters to have the same number of the output event frames as the original input frames? For example, if we set "input_frame_rate" to 10 and "dvs_exposure" to 0.1, the output event is always two frames less than the input
The text was updated successfully, but these errors were encountered: