Welcome to a step-by-step guide on setting up the MaskCam, a cutting-edge smart camera prototype designed for monitoring crowd face mask usage in real-time. This guide will walk you through the installation process on a Jetson Nano Developer Kit, configuration, and troubleshooting tips to ensure a smooth experience. Let’s dive in!
Start Here!
Running MaskCam from a Container on a Jetson Nano Developer Kit
The easiest way to get MaskCam running is by using pre-built Docker containers. Here’s what you’ll need:
- A Jetson Nano Developer Kit running JetPack 4.4.1 or 4.5
- An external DC 5 volt, 4 amp power supply connected through the Dev Kit’s barrel jack connector (J25)
- A USB webcam attached to your Nano
- Another computer with RTSP streaming capability, preferably using VLC or QuickTime.
Start by downloading the MaskCam container from Docker Hub:
sudo docker pull maskcam/maskcam-beta
Then find your Jetson Nano’s IP address and run the MaskCam container:
sudo docker run --runtime nvidia --privileged --rm -it --env MASKCAM_DEVICE_ADDRESS=your-jetson-ip -p 1883:1883 -p 8080:8080 -p 8554:8554 maskcam/maskcam-beta
Viewing the Live Video Stream
If everything is set up correctly, you’ll start receiving streamed video with green boxes marking masked faces and red boxes for those without masks. Copy the RTSP stream URL provided in the logs into your chosen streaming app.
Configuring Your Device Parameters
MaskCam configuration parameters can be easily adjusted using environment variables. For instance, if you want to switch to a different camera device, run:
sudo docker run --runtime nvidia --privileged --rm -it --env MASKCAM_INPUT=v4l2:devvideo1 --env MASKCAM_DEVICE_ADDRESS=your-jetson-ip maskcam/maskcam-beta
Detailed Setup for Cloud Integration
MQTT Server Setup
To send mask detection statistics to the cloud, you’ll need to set up an MQTT server. Clone the MaskCam repository and navigate to the server folder:
git clone https://github.com/bdtinc/maskcam.git
cd maskcam/server
Build and run the server with:
sudo docker-compose up -d
Connect your Jetson Nano to the server via the MQTT protocol, ensuring proper IP addresses are set.
Troubleshooting Common Errors
If you encounter any issues while setting up MaskCam, here are some common errors and their solutions:
- Camera not connected: Ensure the camera is connected and recognized. Check for the presence of
/dev/video0
. - Not Running in Privileged Mode: Ensure you are running with the
--privileged
flag in your Docker run command. - Invalid Camera Capabilities: Adjust camera framerate settings using the
MASKCAM_CAMERA_FRAMERATE
variable. - Streaming or File Server Not Accessible: Confirm that correct ports are mapped in your Docker command.
If you’re still experiencing difficulties, rebooting the device can resolve stuck GPU resources. For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
You’ve successfully set up MaskCam on your Jetson Nano Developer Kit! With this configuration, you can monitor face mask compliance and keep your environment safe. At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.