This project represents one of the IASI laboratories (ro: Inteligență artificială pentru sisteme integrate, en: Artificial Inteligence for Integrated Systems), for the BIOSINF (ro: Tehnologii multimedia în aplicații de biometrie și securitatea informației , en: Multimedia Technologies in Biometrics and Information Security Applications) master program.
First, check if the camera is working by running the following command:
gst-launch-1.0 nvarguscamerasrc ! nvoverlaysinkIf the camera is working, you should see a window with the camera feed. Press Ctrl+C to close the window.
If the camera is not working, make sure the pins are configured correctly. Use the following command to check the pins:
sudo /opt/nvidia/jetson-io/jetson-io.pyRun the following commands to install and update the pip package manager:
sudo apt-get install python3-pip
pip3 install --upgrade pipThe model is in the ONNX format, so we need to install the ONNX Runtime. Run the following commands to install the ONNX Runtime:
wget -O onnx.whl https://nvidia.box.com/shared/static/pmsqsiaw4pg9qrbeckcbymho6c01jj4z.whl
pip3 install onnx.whlJetson Nano should already have the git-cli installed. If not, run the following command:
sudo apt-get install gitThen clone the repository:
git clone https://github.com/andrei-radu/iasi-rps.gitIn order to run the project on a desktop, please install the following packages using your preferred package manager. We recommend using pip for this task.
pip install numpy opencv-python onnxruntimeRun the following command in the root directory of the project to download the model:
wget -O models/MobileNetV3FF_small.onnx 'https://ctipub-my.sharepoint.com/:u:/g/personal/andrei_radu_danila_upb_ro/EcVw-er6EQxGnJHCbpn9whcBA-zFJEfCabobcuHprMTlAg?e=rzeGU1&download=1'For the .pth model (optional), run use this command instead:
wget -O models/MobileNetV3FF_small.pth 'https://ctipub-my.sharepoint.com/:u:/g/personal/andrei_radu_danila_upb_ro/EZXgxLpmO7hOt4GqmMwleXQBE509Mq81vP7F6khJg4MgaQ?e=4hC87T&download=1'Keep in mind that in order to use the .pth model, you need to have the torch and torchvision packages installed. You can install them by following the instructions from here. This project was tested on PyTorch 1.9.0 and Torchvision 0.10.0, builded from wheel, which are the versions that should be installed. For desktop instalation, please refer to the official PyTorch website.
To run this project, simply call the main function by using the following:
python3 main.pyIn order to run the project on a desktop, use:
python3 main.py --platform desktopIf you want to use the .pth model, you can specify it by using the following command:
python3 main.py --framework torch- HaGRID, which is under the CC-by-SA licence.