- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi~Team
As we know that the demonstrate in website is doing very well , but I want to know how to change video source in webcam via RESTful API , I tried to modify the RESTful API into
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
Yes, when we use the -v parameter it replaces the content within the container (beneath "/home/video-analytics/pipelines"), so when you run docker exec -it container_id bash we should see object_detection/2/pipeline.json located there.
So let's confirm the contents of the folder beneath ~/dev/edge_insights_retail/pipelines on your host. If there is indeed an object_detection folder at this location it should show up within the container.
The "Connection refused" error indicates a bad launch of the service, likely due to problems loading the pipeline. I notice the values used need to be adjusted.
replace:
v412src device=dev/video
with (lower case L and a leading slash):
v4l2src device=/dev/video0
When these two issues above are addressed the curl command should run successfully.
Some troubleshooting reminders that you may already be handling, but just in case:
1. First, please confirm no other video_analytics_serving_gstreamer containers are running (if so, stop and remove them)
docker ps
docker stop container_id
2. after running the container, view logs and available pipeline(s) using:
docker logs container_id
Best regards,
Tobias
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We will look through it and get back to you soon.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi~Nadia_J
I'm looking forward to your reply
Many thanks
BR
Noway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After started service, you should be able to find API documents at http://localhost:8080/ui.
According to description of "DeviceSource", to use webcam device, assuming there is only one webcam in system, you need something like '{source: { "path": "/dev/video0", "type": "device" }'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi~Wayne
Thanks for your quickly reply.
I try the command by your suggestion , when I type
curl localhost:8080/pipelines/object_detection/2 -X POST -H 'Content-Type: application/json' -d '{ "source": { "path": "/dev/video0", "type": "device" }}'
It will response "Unexpected error" in the terminal
and I try to delete the space between "device" and " } " (shown as below in red square) , the command execute but nothing happen (I just wait for it about 10 mins)
I'm sure that webcam works by gst-launch-1.0 command
So , how do we trace the log to see what happen in it and Is there anything else I need to pay attention to ??
by the way , I using VMware 15 and Ubuntu 18.04.4 over testing
BR
Noway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Noway Can you provide the Video Analytics Serving log?
Also you can set the LOG_LEVEL="DEBUG" environment variable and set GST_DEBUG=3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Noway I've requested some more information from our internal teams on the set up of VA Serving in Edge Software Hub and will get back to you with more details on the steps but probably will take a day or two. Sorry for the delay.
Also - just to double confirm - the samples using files is working correctly for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok , I got it , I'm looking forward to your reply.
"the samples using files is working correctly for you?"
=> Yes , the demonstration works very well by my side.
Many thanks
BR
Noway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day
After do more research , it might be the pipeline problem in the VAS docker.
When I issued the command as below
And check the pipeline.json inside VAS docker , then I saw that every single pipeline.json all began with
"urisourcebin uri=\"{source[uri]}\" ........" started ,
It might be the problem that we couldn't executed command properly.
BR
Noway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to create your own pipeline (or copy original one) which start with 'v4l2src'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi~Wayne
The suggestion , It seen didn't work by my side.
first of all , I copied the file (pipeline/gstreamer/object_detection/2/pipeline.json) from docker and outside to the host
and modified it into v412src device=\"{source[path]}\" , then copied it into the docker in
pipeline/gstreamer/object_detection/4 path
and issued the curl command by following and we got "Invalid Pipeline or Version" response form terminal
Is there anything else I need to pay attention to ??
Many thanks
BR
Noway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like great progress! Can you restart the service with the new pipeline in place?
VA Serving currently only loads pipelines at start up - so will not pick up a new pipeline added during execution.
Can you zip and send us your pipelines directory? We can take a look at the pipelines and review them offline.
Sorry for the delay in getting you started - we are working to improve the documentation and simplify certain aspects for VA Serving. You can find the latest https://github.com/intel/video-analytics-serving.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure copying pipeline files after VAS container started would work. Could you please try 'docker run' command with extra parameter '-v /path/to/your/pipelines:/home/video-analytics-serving/pipelines' so that VAServing loads your pipelines on startup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is correct - VA Serving will not reload pipelines at runtime - the pipelines need to be present when the container / image is started.
You can either add the pipeline into the image, or volume mount the pipelines folder as @Wayne_Feng described.
From our conversation today - you may have a similar set up (virtual box / docker / va serving) - could you help review the steps required to modify a va serving pipeline within the context of the Edge Insights for Retail reference design?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Noway Please try updating the pipeline to hardcode the webcam. Here are full instructions.
1. Launch container interactively:
sudo docker run -it --rm --privileged --net=host -v ~/.Xauthority:/root/.Xauthority -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v /tmp:/tmp -e DISPLAY=$DISPLAY --entrypoint /bin/bash video_analytics_serving_gstreamer_edgex:0.2.2
2. Cat and copy pipeline content to clipboard:
cat pipelines/gstreamer/object_detection/2/pipeline.json
3. Store pipeline outside the image:
cd ~/dev/edge_insights_retail
mkdir -p ./pipelines/object_detection/2
sudo nano ./pipelines/object_detection/2/pipeline.json
4. Paste contents of original pipeline and update:
replace: "template": "urisourcebin uri=\"{source[uri]}\" !
with: "template": "v4l2src device=/dev/video0 !
5. Now launch the container normally, but with volume mount to support your externally defined pipeline:
sudo docker run --rm -d --privileged --net=host -v ~/.Xauthority:/root/.Xauthority -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v /tmp:/tmp -v ~/dev/edge_insights_retail/pipelines/gstreamer:/home/video-analytics/pipelines -e DISPLAY=$DISPLAY video_analytics_serving_gstreamer_edgex:0.2.2
6. Start the pipeline instance (source uri here will be ignored):
curl localhost:8080/pipelines/object_detection/2 -X POST -H 'Content-Type: application/json' -d '{ "source": { "uri": "file:///nil", "type": "uri" }}'
7. Should result in webcam with person detected (when you are in view).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi~Tobias
Good day
Following the steps , we got the error response as below
So , I wrote down the detail for more information as followings
1. launched the VAS command as normally , and checked the demonstration worked or not
2. Into the docker and copied pipelin.josn content to ~/dev/edge_insights_retail/pipeline/object_detection/2/pipeline.json
3. Stop the previous docker and launched a new one by following command then check pineline.josn content was what we wanted
sudo docker run --rm -d --privileged --net=host -v ~/.Xauthority:/root/.Xauthority -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v /tmp:/tmp -v ~/dev/edge_insights_retail/pipelines:/home/video-analytics/pipelines -e DISPLAY=$DISPLAY video_analytics_serving_gstreamer_edgex:0.2.2
(the sample might be wrong with ~/dev/edge_insights_retail/pipelines/gstreamer path , when I launched the docker with this path , we can't saw pipeline.josn in it , graph shown as below)
4. launched curl command and we got the error response
Should I catch some logs for more detail ?
If yes , please tell me how to do it .
Many thanks
BR
Noway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
Yes, when we use the -v parameter it replaces the content within the container (beneath "/home/video-analytics/pipelines"), so when you run docker exec -it container_id bash we should see object_detection/2/pipeline.json located there.
So let's confirm the contents of the folder beneath ~/dev/edge_insights_retail/pipelines on your host. If there is indeed an object_detection folder at this location it should show up within the container.
The "Connection refused" error indicates a bad launch of the service, likely due to problems loading the pipeline. I notice the values used need to be adjusted.
replace:
v412src device=dev/video
with (lower case L and a leading slash):
v4l2src device=/dev/video0
When these two issues above are addressed the curl command should run successfully.
Some troubleshooting reminders that you may already be handling, but just in case:
1. First, please confirm no other video_analytics_serving_gstreamer containers are running (if so, stop and remove them)
docker ps
docker stop container_id
2. after running the container, view logs and available pipeline(s) using:
docker logs container_id
Best regards,
Tobias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi~Tobias
Yes , you were right.
I got the typo when I modified pipeline.json file.
And now , this question has been resolved
Thanks for your strongly supported
BR
Noway

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page