Why the Device with "CPU" name is not registered in the InferenceEngine when using openvino? - openvino

Description:
I have completed the installation of openvino toolkit and build the samples provided in deployment_tool/open_model_zoo/demos, then when I run the ./segmentation_demo, I got the problem like this. Does anyone used to got the same pro as me? Thanks for your stay.
on my machine:
(base) [root#VM-218-78-centos ~/omz_demos_build/intel64/Release]# ./segmentation_demo -i 0 -m /data/chriisyang/fastseg-small/fastseg-small_t15_108.xml
[ INFO ] InferenceEngine: 0x7efdd1f31090
[ INFO ] Parsing input parameters
[ INFO ] Device info
[ ERROR ] Device with "CPU" name is not registered in the InferenceEngine

I have validated the Segmentation Demo using OpenVINO2021.3 and everything works fine. Make sure you meet the System Requirements needed.

Related

Rostopic info /scan works but rostopic echo /scan does not

I'm working on a virtual machine ubuntu 20.04 version and am currently running a turtlebot3 through teleoperation on ROS Noetic. Although I'm able to control movement on the turtlebot3 and movement is shown on Rviz, it doesn't show any laser output when I put obstacles in front of it.
So I check the topics I had using rostopic list and rostopic info /scan which shows:
ubuntu#ubuntu:~$ rostopic info /scan
Type: sensor_msgs/LaserScan
Publishers:
/turtlebot3_lds (http://192.168.43.254:35003/)
Subscribers:
/turtlebot3_diagnostics (http://192.168.43.254:45509/)
/turtlebot3_slam_gmapping (http://192.168.43.148:36011/)
/rviz (http://192.168.43.148:42191/)
But when I use rostopic echo /scan it just hangs...

Get Segmentation Fault when loading sample model face-detection-adas-0001.xml on openvino Raspberry Pi 4

When I run the sample, specifying the model and path to the input image:
./armv7l/Release/object_detection_sample_ssd -m ./open_model_zoo/tools/downloader/intel/face-detection-adas-0001/FP32/face-detection-adas-0001.xml -d MYRIAD -i test.jpg
There is a segmentation fault
[ INFO ] InferenceEngine:
IE version ......... 2021.4.2
Build ........... 2021.4.2-3974-e2a469a3450-releases/2021/4
Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] test.jpg
[ INFO ] Loading Inference Engine
[ INFO ] Device info:
MYRIAD
myriadPlugin version ......... 2021.4.2
Build ........... 2021.4.2-3974-e2a469a3450-releases/2021/4
[ INFO ] Loading network files:
[ INFO ] ./open_model_zoo/tools/downloader/intel/face-detection-adas-0001/FP32/face-detection-adas-0001.xml
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the device
Segmentation fault
I have searched everywhere, but there is no solution for this problem. Please help me.
This error can be resolved by adding -DCMAKE_CXX_FLAGS="-march=armv7-a" to cmake command when you build Object Detection SSD C++ Sample.
Build Object Detection SSD C++ Sample using the following command:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino_2021/deployment_tools/inference_engine/samples/cpp
make -j2 object_detection_sample_ssd

Sink to the virtual v4l2 device

I have tried an example on Ubuntu 19.04
gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video10
But gstreamer fails
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Cannot identify device '/dev/video10'.
Additional debug info:
v4l2_calls.c(609): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
system error: No such file or directory
Setting pipeline to NULL ...
Freeing pipeline ...
Why it doesn't work? I haven't found this in the documentation, do I need to create /dev/video10 somehow?
I did the same for the default device /dev/video1, but it is an input camera device on my laptop:
sudo gst-launch-1.0 videotestsrc ! v4l2sink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Device '/dev/video1' is not a output device.
Additional debug info:
v4l2_calls.c(639): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
Capabilities: 0x4a00000
Setting pipeline to NULL ...
Freeing pipeline ...
Thank in advance.
The title of your questions suggests you would like to write to a virtual video device. v4l2 devices can be both input and output video devices. Your camera is a video input (capture) device. Directing a v4l2sink (so an endpoint of the pipeline) in gstreamer will likely fail.
You can however generate a virtual output device. What you are looking for is something like the v4l2-loopback device. It allows you to generate a virtual /dev/video10 device like this:
modprobe v4l2loopback video_nr=10
Another possible solution for the same error message: recreate the v4l2loopback interface:
sudo rmmod -f v4l2loopback
sudo modprobe v4l2loopback
This might apply to others experiencing the error message from the original question, but who are already aware they need a v4l2loopback device as gstreamer sink.
When trying to stream a video to the existing v4l2loopback device I streamed to using ffmpeg before, I got the same error message
Device '/dev/video0' is not a output device.
Investigation
When comparing the state of a working loopback video device and a non-working one (i.e. after writing to it with ffmpeg) with v4l2-ctl --all -d 0 using diff, I found the following difference :
--- working 2020-11-19 18:03:52.499440518 +0100
+++ non-working 2020-11-19 18:03:57.472802868 +0100
## -3,21 +3,18 ##
Card type : GPhoto2 Webcam
Bus info : platform:v4l2loopback-000
Driver version : 5.9.8
- Capabilities : 0x85208002
- Video Output
+ Capabilities : 0x85208000
Video Memory-to-Memory
Read/Write
Streaming
Extended Pix Format
Device Capabilities
- Device Caps : 0x05208002
- Video Output
+ Device Caps : 0x05208000
Video Memory-to-Memory
Read/Write
Streaming
Extended Pix Format
Priority: 0
-Video output: 0 (loopback in)
Format Video Output:
Width/Height : 960/640
Pixel Format : 'YU12' (Planar YUV 4:2:0)
Somehow that "Video Output" capability is required for gstreamer to work successfully and taken away by my previous ffmpeg call.
The behaviour only occured when I loaded the v4l2loopback module with the exclusive_caps=1 option, see 1.
The solution was to unload / load the v4l2loopback kernel commands, forcefully removing the v4l2loopback kernel module and adding it again using rmmod / modprobe (see above).

ZTE Open don't boot after flash to Firefox OS 1.2

I have ZTE Open with custom ROM Boot2Gecko 1.3.0.0-prerelease (Git 2013-10-19 22:09:07 d544afff51)
I'm building B2G v.1.2.
BRANCH=v1.2 ./config.sh inari
./build
Build finishes successful.
I'm flashing and see next:
./flash.sh
< waiting for device >
erasing 'cache'...
OKAY [ 0.530s]
finished. total time: 0.530s
erasing 'userdata'...
OKAY [ 1.405s]
finished. total time: 1.405s
sending 'userdata' (55044 KB)...
OKAY [ 5.074s]
writing 'userdata'...
OKAY [ 10.051s]
finished. total time: 15.125s
sending 'system' (81724 KB)...
OKAY [ 7.507s]
writing 'system'...
OKAY [ 14.973s]
finished. total time: 22.479s
rebooting...
finished. total time: 0.001s
Attempting to set the time on the device
time 1384896807 -> 1384896807.0
But my phone is frizzed on logoscreen
adb shell dmesg returns next: https://gist.github.com/blackbass1988/7559973
I'm building on MacosX 10.9
Strange, why build says that everything ok, but not ok
You used the adapted boot.img? Without this you will not be able to get a working system, just by using the build instructions on MDN. Here are some blogs that describe the build process:
https://blog.non.co.il/index.php/zte-open-phone-upgrading-to-firefoxos-1-1-how-to/
http://rowehl.com/blog/2013/10/24/firefoxos-1-dot-2-on-zte-open/
http://sl.edujose.org/2013/10/adapted-boot-image-for-use-with-b2g.html
Odd. Try reseting the cache from the system recovery.
ie : reboot, hold the power+volume up while it's restarting and you should get to the system recovery. move down to "wipe cache partition" w/ the volume down button and hit power button to confirm. Then reboot the device again and see if it starts up.

Using Linux virtual mouse driver

I am trying to implement a virtual mouse driver according to the Essential Linux device Drivers book. There is a user space application, which generates coordinates as well as a kernel module.
See: Virtual mouse driver and userspace application code and also a step by step on how to use this driver.
1.) I compile the code of the user space application and driver.
2.) Next i checked dmesg output and have,
input: Unspecified device as /class/input/input32
Virtual Mouse Driver Initialized
3.) The sysfs node was created properly during initialization (found in /sys/devices/platform/vms/coordinates)
4.) I know that the virtual mouse driver (input32 ) is linked to event5 by checking the following:
$ cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name=""
P: Phys=
S: Sysfs=/devices/virtual/input/input32
U: Uniq=
H: Handlers=event5
B: EV=5
B: REL=3
5.) Next i attach a GPM server to the event interface: gpm -m /dev/input/event5 -t evdev
6.) Run the user space application to generate random coordinates for virtual mouse and observe generated coordinates using od -x /dev/input/event5.
And nothing happens. Why?
Also here author mentioned that gdm should be stopped, using /etc/init.d/gdm stop, but i get "no such service" when stopping gdm.
Here is my complete script for building and runing virtual mouse:
make -C /usr/src/kernel/2.6.35.6-45.fc14.i686/ SUBDIRS=$PWD modules
gcc -o app_userspace app_userspace.c
insmod app.ko
gpm -m /dev/input-event5 -t evdev
./app_userspace
Makefile:
obj-m+=app.o
Kernel version: 2.6.35.6
As i said before i can recieve the result through od, but i received it through your program
echo 9 19 > /sys/devices/platform/virmouse/vmevent
gives:
time 1368284298.207654 type 2 code 0 value 9
time 1368284298.207657 type 2 code 1 value 19
time 1368284298.207662 type 0 code 0 value 0
So now the question is: what is wrong with X11? I would like to stress, that i tried this code under two different distributions Ubuntu 11.04 and Fedora 14.
Maybe this will help: in Xorg.0.log i see the following:
[ 21.022] (II) No input driver/identifier specified (ignoring)
[ 272.987] (II) config/udev: Adding input device (/dev/input/event5)
[ 272.987] (II) No input driver/identifier specified (ignoring)
[ 666.521] (II) config/udev: Adding input device (/dev/input/event5)
[ 666.521] (II) No input driver/identifier specified (ignoring)
I spent a huge amount of time, resolving this issue, and i would like to help other people, who run in this problem. I think some outer X11 features interfered my module work. After disabling GDM it now works fine (runlevel 3). Working code you can find here http://fred-zone.blogspot.ru/2010/01/mouse-linux-kernel-driver.html working distro ubuntu 11.04 (gdm disabled)
Try replacing the below lines of code in the input device driver
set_bit(EV_REL, vms_input_dev->evbit);
set_bit(REL_X, vms_input_dev->relbit);
set_bit(REL_Y, vms_input_dev->relbit);
with
vms_input_dev->name = "Virtual Mouse";
vms_input_dev->phys = "vmd/input0"; // "vmd" is the driver's name
vms_input_dev->id.bustype = BUS_VIRTUAL;
vms_input_dev->id.vendor = 0x0000;
vms_input_dev->id.product = 0x0000;
vms_input_dev->id.version = 0x0000;
vms_input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
vms_input_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE);
vms_input_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
vms_input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
vms_input_dev->relbit[0] |= BIT_MASK(REL_WHEEL);
It worked for me on ubuntu 12.04

Resources