This demo showcases a Personal Protective Equipment (PPE) detection application using the YOLOv8n model with 512x512 input resolution. The system is designed to predict and classify individuals based on their safety compliance in real-time video streams or images. The model identifies three categories:
- Safety: The person is wearing both a helmet and a vest.
- Half-Safety: The person is wearing either a helmet or a vest, but not both.
- Non-Safety: The person is wearing neither a helmet nor a vest.
By leveraging advanced object detection capabilities, the application helps monitor and enforce safety protocols in industrial or construction environments, ensuring that personnel adhere to required safety standards.
- High-Efficiency AI Inference : Utilizes a unique dataflow architecture with at-memory computing, enabling fast and power-efficient AI model inference.
- Seamless Integration : Connects to host systems via standard PCIe or USB interfaces, supporting x86, ARM, and RISC-V processors on both Windows and Linux platforms.
- Full AI Offloading : Handles all AI inference on-chip, requiring the host only for pre- and post-processing, which simplifies software development and deployment.
- Ensure your host machine is equipped with a MemryX MX3 module.
- Follow the installation instructions at MemryX Developer Hub to install the MX3 driver. Verify that the driver is successfully installed on your device before proceeding.
- X11 Display Support: Facilitates seamless rendering of model outputs directly to a host display from inside the container environment.
- (Optional) USB Camera Access:
The application can utilize a connected USB camera for live streaming PPE detection. Ensure your camera is plugged in and accessible to the container for real-time video inference.
The provided Docker image is designed for seamless deployment and execution of the PPE detection demo on Ubuntu 24.04 host systems. The container comes pre-installed with all necessary dependencies, including:
- MemryX Runtime SDK 1.2: Enables efficient interaction with the MemryX MX3 accelerator.
- Qt Development Tools: Includes
qtbase5-devandqt5-qmakefor building and running the graphical user interface. - OpenCV Development Libraries:
libopencv-devfor image and video processing tasks. - CMake: Facilitates building C++ projects within the container.
- ONNX Runtime v1.18.1: Provides high-performance inference for ONNX models.
This Docker image provides a ready-to-use environment for running the PPE detection application, eliminating the need for manually installing dependencies.
-
Pull the Docker Image from Harbor Registry
Use the following command to pull the image:docker pull harbor.edgesync.cloud/memryx-npu-demo/memryx@sha256:b661667b07e400f3ca3e54bc6887f7812232ebc25765e74203862f0fb0a0e13e
-
Tag the Pulled Image
After pulling, tag the image for easier reference:docker tag c8a956486bc0 memryx:demo
-
Download the Docker Image
Download the Docker image from this link. -
Load a prebuilt Docker image
Load docker image by using:docker load -i memryx_demo.tar
Tip: You can also use the provided script
scripts/pull_docker_image.shto automate the image download, loading, and tagging steps described above.
-
Run the PPE detection with video
Start the container with (or use the provided scriptscripts/run_ppe_video.sh):xhost +local:root docker run -t -i --rm\ --privileged=true\ --network="host"\ -e DISPLAY=$DISPLAY\ -v /tmp/.X11-unix:/tmp/.X11-unix\ --name test memryx:demo \ bash -c "cd /home/PPE/build && ./yolov8_ppe" -
Run the PPE detection with camera streaming Start the container with (or use the provided script
scripts/run_ppe_camera.sh):xhost +local:root docker run -t -i --rm\ --privileged=true\ --network="host"\ -e DISPLAY=$DISPLAY\ -v /tmp/.X11-unix:/tmp/.X11-unix\ --name test memryx:demo \ bash -c "cd /home/PPE/build && ./yolov8_ppe -c ../configs/YOLOv8n_PPE_usbcam.txt"
Below is an example of the PPE detection output. The system highlights detected individuals and classifies their safety compliance in real-time:

