/Realtime-Detection-from-Scratch

This repo provides a edge computing solution for realtime detection that reads captures using RTSP, processes the captures via darknet and OpenCV for certain tasks.

Primary LanguagePython

Requirements

  1. Edge computing solution: Intel NUC or Nvidia Jetson Xavier NX if using deep learning
  2. Ubuntu 18.04
  3. Opencv installation
    sudo apt-get install python3-pip
    pip3 install scikit-build -i https://mirrors.aliyun.com/pypi/simple
    pip3 install pip -U
    pip3 install cmake -i https://mirrors.aliyun.com/pypi/simple
    pip3 install opencv-python -i https://mirrors.aliyun.com/pypi/simple
  4. Other dependencies
    pipreqs ./ --encoding=utf8 --force
    pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple

PLC connection

  1. List system port: dmesg | grep ttyS*
  2. Modify port authentication: sudo usermod -aG dialout username
  3. modbus_tk for PLC and PC communication

Ubuntu18.04 auto-suspend prohibition

  1. Check sleep status: systemctl status sleep.target
  2. Mask sleep status: sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
  3. Install sudo apt-get install gnome-tweak-tool
    Run: gnome-tweaks and turn OFF "Suspend when laptop lid is closed"

Auto execute python scripts when system boots

  1. Run: gnome-session-properties
  2. Add Command: gnome-terminal -x python3 xxx.py