-
Notifications
You must be signed in to change notification settings - Fork 295
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
Video4Linux and Genicam #814
Comments
Another alternative for Genicam is https://github.com/genicam/harvesters |
Some python wrappers seems to me LGPL https://github.com/duanhongyi/pyv4l2 cause I think the header Is |
Another cross platform alternative for USB camera was the libuvc python wrappers but I don't know if its Is currently maintained upstream https://github.com/pupil-labs/pyuvc |
Another alternative for USB cams was to use ffmpeg directly https://trac.ffmpeg.org/wiki/Capture/Webcam But then you will not control too much camera parameters. |
Thanks @bhack, that looks promising. I will take a look. |
@yongtang , thank you for the tag. At a first glance it is at a little bit lower level than my current plane of interest. I'm mostly working with cameras and other audio/video sources available over IP: RTP, RTSP , HTTP, RTMP, WebRTC. I will still keep an eye on this thread for intersections. Just as a reference, here is a technical blog on my recent activities if anyone on this thread is interested. My experiments continue to show that there is quite a bit of friction in the transformation of media from existing IP wire formats to TF graphs. I remain interested in more direct ways to ingest media into TFIO, but it's not obvious how that can be done without architecting novel models that understand the time dimension and are not only based on individual image frames. |
@ivelin With respect to WebRTC, I think it might be much easier to build a custom ops in C++ to read WebRTC into tf graph. This could be more useful in certain situations (than low level RTP/etc). |
@bhack In order to use Video4Linux it looks like a USB camera might be needed. I don't have a USB camera or a Linux on hands, so it may take some more time. I labeled the issue with In the mean time, I played with Video Camera on macOS, and is managed to build a dataset input in PR #821 . The PR #821 uses AVFoundations' Swift API, and then exported to C (cdicl) so that video capture's raw image is available as a Dataset, potentially usable by tf.keras. At the moment, the raw image is in native NV12 ( The conversion from NV12 => RGB is not in place yet, but I am looking into it. In the mean time, once a pipeline is in place, it will be possible for us to port the pipeline on Linux with Video4Linux I think (when usb camera is available). |
You don't need a camera. You can just run a Debian/Ubuntu image on with Docker and use a loopback device installing https://packages.debian.org/search?keywords=v4l2loopback Edit: |
Generally from "live" Video source you need to rectify/undistort frames. What we could do for other cameras? Are there some helper ops that we could recover from https://github.com/tensorflow/graphics? What do you think? |
On TF/Graphics they have started a stub color conversion namespace but who know if they talked with TF.image team? They had also request to expand over undistort: |
@bhack Making a change to other different repos might be a challenge, as it involved multiple teams, and tensorflow-io's maintainers are mostly outside of google. tensorflow-io also has image related APIs like decode_tiff/decode_webp/encode_bmp which are not available in tf.image. I think one solution is to have tensorflow-io have a consistent public facing namespace, and reuse APIs either tf.image or tf.graphics internally to allow a consistent ux for user. |
/cc @julienvalentin |
I think that at some point we could re-evaluate https://libcamera.org/ |
Is there any planned to support Video4Linux and Genicam cameras?
The text was updated successfully, but these errors were encountered: