AxisCommunications / AxisCommunications/acap-computer-vision-sdk-examples
Can't save Inference resuluts on Docker container on P1467
- Dominant language
- Python
- Stars
- 64
- Forks
- 25
- Avg merge
- 22m
- Merged PRs (30d)
- 3
Description
> **Please do not disclose security vulnerabilities as issues. See our [security policy](../../SECURITY.md) for responsible disclosures.**
### Before opening an issue
#### Issue Checklist
- [ x] I have checked the [compatibility table](https://axiscommunications.github.io/acap-documentation/docs/api/computer-vision-sdk-apis.html#compatibility) in the documentation.
- [x ] I have verified that the SDK version I am using is compatible with the firmware version installed on my device.
- [ x] I have included the SDK version and firmware version in my issue description for reference.
- [ x] I have followed the minimum debug steps on my own.
- [ x] I have included the output of the debug steps in the issue.
1. Set up
$env:CHIP="artpec8"
### Environment
- Axis device model: P1467-LE
- Axis device firmware version: 12.1.64
- Stack trace or logs: [e.g. Axis device system logs]
- OS and version: [Windows build 19045.5247]
- Version: [version of the application, SDK, runtime environment, package manager, interpreter, compiler, depending on what seems relevant]
### Additional context
I defined "out_video" folder under the root folder and chaged its mode 777 in the Dockerfile for the detector.py as follows;
# Directory for output and change mode
RUN mkdir -p /out_video
RUN chmod -R 777 /out_video

I wrote to save the inference result as follows;
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
out = cv2.VideoWriter('/out_video/detected_video.mp4', fourcc, fps, (frame_width, frame_height))

I ivoked docker-compose to run detector.py on P1467 cam with docker-composer.yml after cleaning the docker memory up.
I defined "/out_video" in volumes for services of object-detection-python as follows;
volumes:
- /usr/lib/libvdostream.so.1:/usr/lib/libvdostream.so.1
- acap-dl-models:/models:ro
- /out_video:/out_video:rw
- /var/run/dbus:/var/run/dbus:rw
- inference-server:/tmp
But docker terminated with the following message.
Error response from daemon: error while creating mount source path '/out_video': mkdir /out_video: read-only file system

So I set it as "# - /out_video:/out_video:rw", docker-compose run properly and showed the message as folows;
object-detector-python-1 | 0 Objects found
object-detector-python-1 | Time for call to inference-server: 36 ms
object-detector-python-1 | 0 Objects found
object-detector-python-1 | Processed video saved to ./out_video/detected_video.mp4
object-detector-python-1 | Processed video saved to ./out_video/detected_video.mp4 (size: 1.68 MB)
object-detector-python-1 | Video copied to /out_video/detected_video.mp4
object-detector-python-1 exited with code 0


When I accessed to the docker container of detector.py, there exists "out_video" folder under root but it is empty.
Please let me know the way to save the iference results on the docker container of P1467.
Masataka
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Dockerfile, detector.py, and docker-compose.yml shown in the issue, then reproduce the container run on the P1467-LE with firmware 12.1.64. Check the reported read-only filesystem mount error and compare the path where detector.py writes the video with the configured volume. Done means the inference result is saved and remains accessible on the device after the container exits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, opencv, python
- Domain
- devops, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100