Giter VIP home page Giter VIP logo

sharpai / deepcamera Goto Github PK

View Code? Open in Web Editor NEW
1.7K 62.0 291.0 238.45 MB

Open-Source AI Camera. Empower any camera/CCTV with state-of-the-art AI, including facial recognition, person recognition(RE-ID) car detection, fall detection and more

Home Page: https://sharpai.github.io/DeepCamera/

License: MIT License

Shell 1.72% Python 30.74% JavaScript 38.35% Mako 0.01% HTML 0.05% C 0.15% CMake 1.49% C++ 16.61% Dockerfile 0.37% Makefile 0.42% Roff 0.11% CSS 2.36% SCSS 1.80% Less 1.50% EJS 4.32%
tensorflow ai deep-learning face-recognition tf-lite face-detection object-detection video-surveillance machine-learning nvidia-jetson-nano

deepcamera's Introduction

  DeepCamera

Empower camera with SOTA AI
ML pipeline for AI camera/CCTV
Easy to use Edge AI development

GitHub release Pypi release download


DeepCamera empowers your traditional surveillance cameras and CCTV/NVR with machine learning technologies. It provides open source facial recognition based intrusion detection, fall detection and parking lot monitoring with the inference engine on your local device.

SharpAI-hub is the cloud hosting for AI applications which help you deploy AI applications with your CCTV camera on your edge device in minutes.

Features

Empower any camera with the state of the art AI

  • facial recognition
  • person recognition(RE-ID)
  • parking lot management
  • fall detection
  • more comming

ML pipeline for AI camera/CCTV development

  • feature clustering with vector database Milvus
  • labelling with Labelstudio

Easy to use Edge AI development environment

  • AI frameworks in docker
  • desktop in docker with web vnc client, so you don't need even install vnc client

Application 1: Self-supervised person recognition(REID) for intruder detection

SharpAI yolov7_reid is an open source python application leverages AI technologies to detect intruder with traditional surveillance camera. Source code is here It leverages Yolov7 as person detector, FastReID for person feature extraction, Milvus the local vector database for self-supervised learning to identity unseen person, Labelstudio to host image locally and for further usage such as label data and train your own classifier. It also integrates with Home-Assistant to empower smart home with AI technology. In Simple terms yolov7_reid is a person detector.

  • Machine learning technologies
    • Yolov7 Tiny, pretrained from COCO dataset
    • FastReID ResNet50
    • Vector Database Milvus for self-supervised learning
  • Supported Devices
    • Nvidia Jetson
    • Single Board Computer (SBC)
      • Raspberry Pi 4GB
      • Raspberry Pi 8GB
    • Intel X64
      • MacOS
      • Windows
      • Ubuntu
    • MCU Camera
      • ESP32 CAM
      • ESP32-S3-Eye
    • Tested Cameras/CCTV/NVR
      • RTSP Camera (Lorex/Amrest/DoorBell)
      • Blink Camera
      • IMOU Camera
      • Google Nest (Indoor/Outdoor)

Installation Guide

pip3 install sharpai-hub
sharpai-cli yolov7_reid start

Prerequisites

1. Docker (Latest version)
2. Python (v3.6 to v3.10 will work fine)

Step-by-step guide

NOTE: Before executing any of commands mentioned below please start Docker. This guide is to install the sharpai and run the yolov7_reid service but can also be used to start other services.

  1. Install SharpAI-Hub by running the following command in a Command Prompt and Terminal. Remeber this as Command Prompt 1. This will be needed in further steps:
    pip3 install sharpai-hub
    
  2. Now run the following command:
    sharpai-cli yolov7_reid start
    

NOTE: If in a Windows system after running command mentioned in Step 2 if you get error: 'sharpai-cli' is not recognized as an internal or external command, operable program or batch file. Then it means environment variable is not set for Python on your system. More on this at the end of page in FAQ section.

  1. If you are using Windows and get error in step 2 you can also use following command line to start yolov7_reid
python3 -m sharpai_hub.cli yolov7_reid start

OR

python -m sharpai_hub.cli yolov7_reid start
  1. Go to directory C:\Users and open the folder with name of current user. Here look for a folder .sharpai . In .sharpai folder you will see a folder yolov7_reid. Open it and start a new Command Prompt here. Remember this as Command Prompt 2

  2. In Command Prompt 2 run the below command:

docker compose up

NOTE: DO NOT TERMINATE THIS COMMAND. Let it complete. After running the above command it will take roughly 15-20 minutes or even more time to complete depending upon your system specifications and internet speed. After 5-10 minutes of running the command in the images tab of Docker will images will start to appear. If the command ran successful then there must be seven images in images tab plus one container named as yolov7_reid in the container tab.

  1. Go to folder yolov7_reid mentioned in step 4. In this folder there will be file .env. Delete it. Now close the Command Prompt 1. Open and new Command prompt and run the following command again. We will call this as Command Prompt 3.
sharpai-cli yolov7_reid start

OR

python3 -m sharpai_hub.cli yolov7_reid start

OR

python -m sharpai_hub.cli yolov7_reid start
  1. Running command in Step 6 will open a Signup/Signin page in the browser and in Command Prompt it will ask for the Labelstudio Token. After Signing up in you will be taken to your account. At the top right corrent you will see a small cirle with your account initials. Click on it and after that click on Account Setting. Here at the right side of page you will see a Access token. Copy the token and paste it carefully in the command prompt 3.

  2. Add Camera to Home-Assistant, you can use "Generic Camera" to add camera with RTSP url

  3. In this step, we will obtain the camera entity ID of your cameras. After adding your camera to home-Assistant, go to the Overview tab. Here all your cameras will be listed. Click on the video stream of a camera, after which a small popup will open. At the top right of the popup, click the gear icon to open the settings page. A new popup will open with a few editable properties. Here look for Entity ID, which is in the format camera.IP_ADDRESS_OF_CAMERA, copy/note this entity ID (these entity ids will be required later). If you have multiple cameras, we will need each cameras Entity ID. Note all these camera entity IDs.

  4. Run following two commands to open and edit the configuration.yaml of Home-Assistant:

docker exec -ti home-assistant /bin/bash 
vi configuration.yaml

NOTE FOR WINDOWS SYSTEM USERS: These commands wont work with windows Systems. For Windows system, please open Docker (the instance of Docker, which is already running from the start) and in the container tab, open the yolov7_reid. Here look for the home-assistant container. Hover your mouse cursor on the home-assistant container, and a few options will appear. Click on cli. An inbuilt console will start on the same page. If the typing cursor keeps blinking and nothing shows up on the inbuilt console, then click on Open in External Terminal, which is just above the blinking cursor. After clicking it, a new command prompt will open. To check everything is working as expected, run the command ls and see if the commands list the files and folders in the config folder.

Now run a command vi configuration.yaml. This command will open your configuration file of the home-assistant in the Vi editor. Vi Editor is a bit tricky if you are unfamiliar with using it. You will now have to enter into Insert mode to add the integration code mentioned in Step 9 to the configuration file. Press the I key to enter Insert mode and go end of the file using the down arrow key. Next, press the right mouse (while the mouse cursor is inside the command prompt window) while in the command prompt. This will paste the integration code that you had copied earlier. After making changes to the config file, press the escape key, type the following :wq (yes with colon) and press enter key. You will be back taken to /config #. This command :wq means you want to write changes to the config file and quit (I told you Vi is a bit tricky for beginners). You can now close the command prompt.

  1. Add the below code to the end of configuration.yaml file.

Here, replace camera.<camera_entity_id> with the camera entity ID we obtained in Step 9. If you have multiple cameras then keep adding the entity_id under images_processing.

stream:
  ll_hls: true
  part_duration: 0.75
  segment_duration: 6

image_processing:
  - platform: sharpai
    source:
      - entity_id: camera.<camera_entity_id>
    scan_interval: 1

If you have multiple cameras then after changing the 'entity_id' the code will become similar to this:

stream:
  ll_hls: true
  part_duration: 0.75
  segment_duration: 6

image_processing:
  - platform: sharpai
    source:
      - entity_id: camera.192_168_29_44
      - entity_id: camera.192_168_29_45
      - entity_id: camera.192_168_29_46
      - entity_id: camera.192_168_29_47
    scan_interval: 1
  1. At home-assistant homepage http://localhost:8123 select Developer Tools. Look for and click Check Configuration under Configuration Validation. If everything went well then it must show "Configuration Valid'. Click Restart.Now go to the container tab of docker, click three vertical dots under Actions and press restart. Open the Overview tab of home-assitant. If you see Image Processing beside your cameras and below it Sharp IP_ADDRESS_OF_YOUR_CAMERA, then congrats. Everything is working as expected.

NOTE: Till further steps are added you can use demo video in the beginning tutorial for further help.

Important Links

The yolov7 detector is running in docker, you can access the docker desktop with http://localhost:8000
Home-Assistant is hosted at http://localhost:8123
Labelstudio is hosted at http://localhost:8080

Application 2: Facial Recognition based intruder detection with local deployment

We received feedback from community, local deployment is needed. With local deepcamera deployment, all information/images will be saved locally.
sharpai-cli local_deepcamera start

Application 3: DeepCamera Facial Recognition with cloud for free

  • Register account on SharpAI website
  • Login on device: sharpai-cli login
  • Register device: sharpai-cli device register
  • Start DeepCamera: sharpai-cli deepcamera start

SharpAI Screen monitor captures screen extract screen image features(embeddings) with AI model, save unseen features(embeddings) into AI vector database Milvus, raw images are saved to Labelstudio for labelling and model training, all information/images will be only saved locally.

sharpai-cli screen_monitor start

Access streaming screen: http://localhost:8000

Access labelstudio: http://localhost:8080

Application 5: Person Detector

sharpai-cli yolov7_person_detector start

SharpAI-Hub AI Applications

SharpAI community is continually working on bringing state-of-the-art computer vision application to your device.

sharpai-cli <application name> start
Application SharpAI CLI Name OS/Device
Intruder detection with Person shape yolov7_reid Jetson Nano/AGX /Windows/Linux/MacOS
Person Detector yolov7_person_detector Jetson Nano/AGX /Windows/Linux/MacOS
Laptop Screen Monitor screen_monitor Windows/Linux/MacOS
Facial Recognition Intruder Detection deepcamera Jetson Nano
Local Facial Recognition Intruder Detection local_deepcamera Windows/Linux/MacOS
Parking Lot monitor yoloparking Jetson AGX
Fall Detection falldetection Jetson AGX

Tested Devices

Edge AI Devices / Workstation

Tested Camera:

  • DaHua / Lorex / AMCREST: URL Path: /cam/realmonitor?channel=1&subtype=0 Port: 554
  • Ip Camera Lite on IOS: URL Path: /live Port: 8554
  • Nest Camera indoor/outdoor by Home-Assistant integration

Support

  • If you are using a camera but have no idea about the RTSP URL, please join SharpAI community for help.
  • SharpAI provides commercial support to companies which want to deploy AI Camera application to real world.

DeepCamera Architecture

architecture

Commercial Version

  • Provide real time pipeline on edge device
  • E2E pipeline to support model customization
  • Cluster on the edge
  • Port to specific edge device/chipset
  • Voice application (ASR/KWS) end to end pipeline
  • ReID model
  • Behavior analysis model
  • Transformer model
  • Contrastive learning
  • Click to join sharpai slack channel for commercial support

FAQ

How to install Docker-compose on Jetson Nano

sudo apt-get install -y libhdf5-dev python3 python3-pip
pip3 install -U pip
sudo pip3 install docker-compose==1.27.4

How to create token for Telegram Bot(DOC W.I.P)

  • Create Telegram Bot through @BotFather
  • Set Telegram Token in Configure File
  • Send message to the new bot you created

deepcamera's People

Contributors

axiado-zz avatar cici-tan avatar colaverse avatar danielharrelson avatar dymfangxing avatar franksunnyvale avatar lambda-zhang avatar li-coder-git avatar mriamnobody avatar ningning-718 avatar rick0626 avatar solderzzc avatar yunhaia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepcamera's Issues

Show QR Code directly on Launcher_Termux to easy the setup job

Is your feature request related to a problem? Please describe.
We need get the serial number in command then covert it into qr code by web service, this is not user friendly.

Describe the solution you'd like
Show QR Code directly on Launcher_Termux to easy the setup job

Run_On_Android_aarch64 js error

https://github.com/SharpAI/DeepCamera/blob/master/docs/Run_On_Android_aarch64.md

The last,run the command

cd /data/data/com.termux/files/home/runtime
termux-wake-lock
setsid bash ~/runtime/start_aarch64.sh

Error is as follows(Because the camera didn't open?)

  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
[2019-03-14 12:23:26,762: WARNING/ForkPoolWorker-1] ['workaicmd', 'autogroup_dataset', 'sync_autogroup_dataset', 'autogroup', '/msg/d/b65772ac1e4f']
[2019-03-14 12:23:26,763: WARNING/ForkPoolWorker-1] ['/device/e287250eca0f2eca592500f1']
[2019-03-14 12:23:26,764: WARNING/ForkPoolWorker-1] ['/msg/g/e287250eca0f2eca592500f1']
exit index.js
[2019-03-14 12:23:26,844: WARNING/ForkPoolWorker-1] mqtt connected, rc: 0
[2019-03-14 12:23:26,961: WARNING/ForkPoolWorker-1] workaicmd
[2019-03-14 12:23:26,964: WARNING/ForkPoolWorker-1] autogroup_dataset
[2019-03-14 12:23:26,967: WARNING/ForkPoolWorker-1] sync_autogroup_dataset
[2019-03-14 12:23:26,972: WARNING/ForkPoolWorker-1] autogroup
[2019-03-14 12:23:26,975: WARNING/ForkPoolWorker-1] /msg/d/b65772ac1e4f
[2019-03-14 12:23:26,978: WARNING/ForkPoolWorker-1] /device/e287250eca0f2eca592500f1
[2019-03-14 12:23:26,982: WARNING/ForkPoolWorker-1] /msg/g/e287250eca0f2eca592500f1
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:qCA5imBb-PeyQJwqRAE6_vBJ_dFiSCeK0wUKDUiyK-G
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:bSOK5hKbrN_TxYQpRCZJjCCiPdaVx_p6ziJhoFQFLy3
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!

$ 
$ 
$ fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:fF7rr0OETvpbpZorLnUBWxmQPHikfmIqF5nZFk2XdTG
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:OtooX6I_i_10MYvdpuJ98RPNpJyTG-eBjSF7M07InQO
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:UNqwyEzjKoc42UdMqPInHd3r6FBp1kThWWkSuDtJHmE
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:Z12So4dcQTLQlCb1TZEDdvp6jp7rpHYkgoJHPXAjc4P
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:MkH9EYwUOrO6GslcM4xc3MdTVhcX1d3xPwO4OYhVeg2
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:2wMnzlWFYZhk6YQ73yaRAWu44amkM3u23ipmTdXK5a6
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:1ecVMtVMSgp1cknqYS5A34KKM-sS3u-4Li_UKa35Lw0
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:cRHrwXE-oSHHw9Vgw7Ab6uddvrH-o858dOzrXMGq6jw
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:Yyyao0N8X5gzZymm3fPvCrCm-ZcaJlDl2EGvVoAXT5t
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js
entering index.js
./start_monitor.sh: line 19: pushd: monitor: No such file or directory
new connection to meteor server
4314ef9cb9fab3766e9918fe7a55e7b905e265d99a88026fa110841182426e4d
login ok:MH0U788DloGnsM2o2PwbTbykiBX3Wkj1P9KADDzFRfj
commands complete:
undefined
[ADDED] to devices:  -eabad615d9a3f665de6b9bb6
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
yes, my group id is [e287250eca0f2eca592500f1] for now
watchtower disabled
commands complete:
{ '-eabad615d9a3f665de6b9bb6': 
   { _id: '-eabad615d9a3f665de6b9bb6',
     uuid: 'b65772ac1e4f',
     name: 'b65772ac1e4f开发板',
     in_out: 'inout',
     groupId: 'e287250eca0f2eca592500f1',
     createAt: 2019-03-04T13:26:30.047Z,
     online: true,
     camera_run: false,
     autoUpdate: false } }
The file was saved!

$ 
$ 
$ 
$ 
$ 
$ 
$ 
$ 
$ 
$ 
$ fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at I.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7234)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7447)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
exit index.js


Support for Jetson nano?

Hi there.

thanks for your works.

I am a newbie to this repo. I would like to know whether I can run this DeepCamera in my Jetson nano?

please advise.

Exec format error on raspberry pi

Describe the bug
when I run the start command, I get an exec format error.
Here's the terminal output

sudo ./start-cloud.sh start starting... Stopping api_server ... done Stopping minio ... done Stopping broker ... done Starting api_server ... done Starting minio ... done Starting broker ... done Attaching to api_server, minio, broker api_server | standard_init_linux.go:211: exec user process caused "exec format error" broker | standard_init_linux.go:211: exec user process caused "exec format error" minio | standard_init_linux.go:211: exec user process caused "exec format error" api_server exited with code 1 broker exited with code 1 api_server | standard_init_linux.go:211: exec user process caused "exec format error"

To Reproduce
Steps to reproduce the behavior:
Run the start script on a vanilla raspbian buster on raspberry pi 4 B with only docker and docker compose installed

Expected behavior
This is the first time running this, but I'm guessing I probably shouldn't see this error.

Desktop (please complete the following information):

  • OS: Raspbian GNU/Linux 10 (buster)

Face images are grey on the browser interface. Looks like API server is presenting image without jpg extension.

Great project! Well done.

I am running the master image on a Ubuntu 18.04 VM. (virtualised with Proxmox PVE)
Using a Foscam 720p camera that connects fine via RTSP and I can see a picture.
Flower shows that the images are being processed and uploaded to the Minio bucket.
Connecting to API server port 3000 I see the activity but only grey boxes where the face pictures should be.

If I download the picture from Minio and rename it to *,jpg I can view the picture and it is a face.

In Flower log I can see ['/opt/nvr/detector/images/deepeye_1647774820586.jpg', 1647774820587, 1647774820587, 'pBrIitBTIr']

Screenshot 2022-03-20 221454

For some reason the API server is not presenting the file with the JPG extension. Is this a known Minio bug, or other?

Alert when a camera stream is down

We often don't know that the camera stream is down. A feature that alerts users through Telegram message or any other notification service that a camera stream is down will be a lifesaver for many other users of this tool and me.

Help to solve DeepCamera installation issues

Describe the bug
我尝试在centos7虚拟机上运行deepcamera,在运行到api_server的时候报了一个错误,下面是api_server docker容器的日志,使用的是api_server:3.4.1镜像。

=> Started proxy
=> Started MongoDB
=> Errors prevented startup:
While selecting package versions:
error: Package version not in catalog: crosswalk 1.7.1
While refreshing package catalog to resolve previous errors:
error: Network error: wss://packages.meteor.com/websocket: certificate has expired
=> Your application has errors. Waiting for file change.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/SharpAI/DeepCamera
  2. ./run-on-linux.sh start

Desktop (please complete the following information):

  • OS: CentOS Linux release 7.9.2009 (Core)
  • Docker Server Version: 20.10.9

Additional context
另外还有个问题想请教下,环境是同样的linux centos7.9。在部署私有云系统的时候,执行了./start-cloud.sh start
执行到最后的日志为下,(日志里面没有任何Error),是否表示已经成功部署?但是没有自动结束这个部署脚本。
api_server | I20211028-06:56:04.253(0)? log: [ [Object], [Object] ] } ]
api_server | I20211028-06:56:04.325(0)? []
api_server | I20211028-06:56:05.544(0)? ----setup smtp server---
api_server | I20211028-06:56:05.575(0) (percolate_synced-cron.js:87) SyncedCron: Scheduled "send report email 12:00 am every day" next run @thu Oct 28 2021 06:56:05 GMT+0000 (U
api_server | => Started your app.
api_server |
api_server | => App running at: http://localhost:3000/
api_server | I20211028-07:00:00.009(0) (percolate_synced-cron.js:87) SyncedCron: Starting "send report email 12:00 am every day".
api_server | I20211028-07:00:00.013(0)? send email out
api_server | I20211028-07:00:00.015(0) (percolate_synced-cron.js:87) SyncedCron: Finished "send report email 12:00 am every day".
api_server | I20211028-07:01:18.812(0)? send offline notification
api_server | I20211028-07:01:18.815(0)? { clientId: 'test_client_id_1111' }
api_server | I20211028-07:01:18.815(0)? send offline notification to test_client_id_1111
api_server | I20211028-08:00:00.010(0) (percolate_synced-cron.js:87) SyncedCron: Starting "send report email 12:00 am every day".
api_server | I20211028-08:00:00.016(0)? send email out

To run DeepCamera on devices without Arm Mali OpenCL support

Is your feature request related to a problem? Please describe.
If the device has no OpenCL support, the embedding part will not work, so the DeepCamera can't run.

Describe the solution you'd like
If we add function to fall back to cpu only inference of embedding extract, we will support almost all devices.

Describe alternatives you've considered
Have no idea for now.

Need to ask user if need to download whole package in termux_launcher

Is your feature request related to a problem? Please describe.
Now, only experiment user can use launcher_termux, too many thing for users to do.

Describe the solution you'd like
Let's develop automatically way to help people finish the setup/runtime.

Additional context
Reference code is here

NameError: global name 'm' is not defined

launched current nano branch on jetson nano.
added token for telegram bot.
connected to a RTSP camera stream in local network through Shinobi GUI.
ran: run-on-nano.sh

face_detector | [2022-04-26 11:25:47,895: ERROR/ForkPoolWorker-1] Task upload_api-v2.detect[5ac8a3ac-0fa1-4bcf-99dd-cf074bc2abb0] raised unexpected: NameError("global name 'm' is not defined",)
face_detector | Traceback (most recent call last):
face_detector | File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 374, in trace_task
face_detector | R = retval = fun(*args, **kwargs)
face_detector | File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 629, in protected_call
face_detector | return self.run(*args, **kwargs)
face_detector | File "worker.py", line 52, in detect
face_detector | result = m.detect(image_path,trackerid, ts, cameraId, face_filter=None)
face_detector | NameError: global name 'm' is not defined
face_detector | [2022-04-26 11:25:48,063: INFO/MainProcess] Received task: upload_api-v2.detect[6ada6e39-f2db-4e38-832e-cbbdf38449a5] expires:[2022-04-26 11:26:18.000059+00:00]
detector_plugin | error
detector_plugin | null
detector_plugin | add detect_task failed!!

Your secret keys are public

Your secret keys are public
I can see your secret keys in this URL and This can be dangerous.

image

To Reproduce
Steps to reproduce the behavior:

  1. Go to this link

Expected behavior
You shouldn't store this info in file

run on 3288 ,{ Error: ENOENT: no such file or directory, open ''

error:

[device] tid: 1553216425867 person num: 1 face num: 1 cost: 1405
[2019-03-22 01:00:30,728: INFO/ForkPoolWorker-1] Task upload_api-v2.detect[e7326856-9353-42fd-9157-d4a2a171124c] succeeded in 1.377794542000629s: '{"detected": true, "ts": 1553216429325, "totalPeople": 1, "cropped": [{"path": "/mnt/internal_sd/Download/frame_22032019_090029_131_0.png", "style": "right_side", "blury": 1869.5949723385252, "ts": 1553216429325, "trackerid": 1553216425867, "totalPeople": 1, "cameraId": "device", "width": 179, "height": 180}], "totalmtcnn": 1}'
[2019-03-22 09:00:30,744: INFO/MainProcess] Received task: upload_api-v2.extract_v2[d8d78e01-5bcb-4460-951a-2876329ca15a]   expires:[2019-03-22 01:01:00.000729+00:00]
******cluster_client.call, result******
[2019-03-22 09:00:30,776: INFO/ForkPoolWorker-1] Task upload_api-v2.extract_v2[d8d78e01-5bcb-4460-951a-2876329ca15a] succeeded in 0.0235482919961s: '{"embedding_path": ""}'
uncaughtException { Error: ENOENT: no such file or directory, open ''
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.writeFileSync (fs.js:1299:33)
    at Result.<anonymous> (/data/data/com.termux/files/home/runtime/main.bin.js:1:12188)
    at emitOne (events.js:116:13)
    at Result.emit (events.js:211:7)
    at RedisClient.<anonymous> (/data/data/com.termux/files/home/runtime/node_modules/node-celery/celery.js:180:21)
    at emitThree (events.js:136:13)
    at RedisClient.emit (events.js:217:7)
    at return_pub_sub (/data/data/com.termux/files/home/runtime/node_modules/redis/index.js:794:18)
    at RedisClient.return_reply (/data/data/com.termux/files/home/runtime/node_modules/redis/index.js:833:9) errno: -2, code: 'ENOENT', syscall: 'open', path: '' }
/mnt/internal_sd/Download/frame_22032019_090030_831.jpg
[2019-0

Script for run from code, not built.

Is your feature request related to a problem? Please describe.
Currently the best way to run is following production bundle way, it cost 1 hour some time and very hard for debugging.

Describe the solution you'd like
To create/refine the script for code running.

The latest edition of the code ,run on 3399

read TEMP failed
@solderzzc


[2019-03-22 14:56:21,023: INFO/ForkPoolWorker-1] Task upload_api-v2.detect[a5b20244-8782-4d87-9e66-b7b5a9e7ef6e] succeeded in 0.140305097s: '{"totalPeople": 0, "detected": false, "totalmtcnn": null, "ts": 1553237780843, "cropped": []}'
/storage/emulated/0/Download/frame_22032019_145620_932.jpg
[2019-03-22 14:56:21,076: INFO/MainProcess] Received task: upload_api-v2.detect[07f305a0-4bcd-4a7e-b9e5-6fede78ba017]   expires:[2019-03-22 06:56:51.000062+00:00]
[2019-03-22 14:56:21,253: INFO/ForkPoolWorker-1] Task upload_api-v2.detect[07f305a0-4bcd-4a7e-b9e5-6fede78ba017] succeeded in 0.141344013999s: '{"totalPeople": 0, "detected": false, "totalmtcnn": null, "ts": 1553237781061, "cropped": []}'
[device] tid: 1553237781050 person num: 0 face num: 0 cost: 206
read TEMP failed  { Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at A.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7279)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7536)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5) errno: -22, code: 'EINVAL', syscall: 'read' }
read TEMP failed  { Error: EINVAL: invalid argument, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:575:19)
    at A.os (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7279)
    at Timeout._onTimeout (/data/data/com.termux/files/home/runtime/monitor/main.bin.js:1:7536)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5) errno: -22, code: 'EINVAL', syscall: 'read' }
/storage/emulated/0/Download/frame_22032019_145650_415.jpg

pkg update failed

$ pkg update
Hit:1 https://termux.net stable InRelease
Hit:2 https://its-pointless.github.io/files termux InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
31 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libicu
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  termux-auth
The following packages will be upgraded:
  apt binutils busybox c-ares cmake command-not-found dpkg gdbm git gnupg gpgv graphicsmagick libgcrypt libmosquitto libnghttp2 libsqlite libtiff libuv make mosquitto ncurses ncurses-ui-libs nodejs-lts
  openssh openssl python2-numpy python2-scipy redis setup-scripts termux-tools util-linux
31 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 31.7 MB of archives.
After this operation, 2826 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 https://termux.net stable/main aarch64 busybox aarch64 1.29.3-1
  404  Not Found
Err:2 https://termux.net stable/main aarch64 dpkg aarch64 1.19.2
  404  Not Found
Get:3 https://termux.net stable/main aarch64 libgcrypt aarch64 1.8.4 [272 kB]
Err:4 https://its-pointless.github.io/files termux/extras aarch64 python2-numpy aarch64 1.15.4
  404  Not Found
Err:5 https://its-pointless.github.io/files termux/extras aarch64 python2-scipy aarch64 1.2.0rc1
  404  Not Found
Err:6 https://termux.net stable/main aarch64 gpgv aarch64 2.2.11
  404  Not Found
Get:7 https://its-pointless.github.io/files termux/extras all setup-scripts all 2.6.2 [2632 B]
Err:8 https://termux.net stable/main aarch64 apt aarch64 1.4.8-7
  404  Not Found
Err:9 https://termux.net stable/main all termux-tools all 0.58
  404  Not Found
Get:10 https://termux.net stable/main aarch64 command-not-found aarch64 1.36 [23.7 kB]
Err:11 https://termux.net stable/main aarch64 libnghttp2 aarch64 1.35.0
  404  Not Found
Err:12 https://termux.net stable/main aarch64 ncurses aarch64 6.1.20181117
  404  Not Found
Err:13 https://termux.net stable/main aarch64 openssl aarch64 1.1.1a
  404  Not Found
Err:14 https://termux.net stable/main aarch64 binutils aarch64 2.31.1-3
  404  Not Found
Get:15 https://termux.net stable/main aarch64 c-ares aarch64 1.15.0 [23.1 kB]
Err:16 https://termux.net stable/main aarch64 libuv aarch64 1.24.0
  404  Not Found
Get:17 https://termux.net stable/main aarch64 make aarch64 4.2.1-2 [77.8 kB]
Err:18 https://termux.net stable/main aarch64 cmake aarch64 3.13.1
  404  Not Found
Get:19 https://termux.net stable/main aarch64 gdbm aarch64 1.18.1 [52.0 kB]
Err:20 https://termux.net stable/main aarch64 git aarch64 2.19.2                                                                                                                                            
  404  Not Found
Err:21 https://termux.net stable/main aarch64 libsqlite aarch64 3.25.3                                                                                                                                      
  404  Not Found
Err:22 https://termux.net stable/main aarch64 gnupg aarch64 2.2.11                                                                                                                                          
  404  Not Found
Err:23 https://termux.net stable/main aarch64 libtiff aarch64 4.0.10-1                                                                                                                                      
  404  Not Found
Err:24 https://termux.net stable/main aarch64 graphicsmagick aarch64 1.3.31                                                                                                                                 
  404  Not Found
Err:25 https://termux.net stable/main aarch64 libmosquitto aarch64 1.5.4                                                                                                                                    
  404  Not Found
Err:26 https://termux.net stable/main aarch64 mosquitto aarch64 1.5.4                                                                                                                                       
  404  Not Found
Err:27 https://termux.net stable/main aarch64 ncurses-ui-libs aarch64 6.1.20181117                                                                                                                          
  404  Not Found
Err:28 https://termux.net stable/main aarch64 nodejs-lts aarch64 8.13.0                                                                                                                                     
  404  Not Found
Get:29 https://termux.net stable/main aarch64 termux-auth aarch64 1.1 [3748 B]                                                                                                                              
Err:30 https://termux.net stable/main aarch64 openssh aarch64 7.9p1-1                                                                                                                                       
  404  Not Found
Err:31 https://termux.net stable/main aarch64 redis aarch64 5.0.2                                                                                                                                           
  404  Not Found
Err:32 https://termux.net stable/main aarch64 util-linux aarch64 2.33-1                                                                                                                                     
  404  Not Found
Fetched 455 kB in 10s (43.8 kB/s)                                                                                                                                                                           
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/busybox_1.29.3-1_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/dpkg_1.19.2_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/gpgv_2.2.11_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/apt_1.4.8-7_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-all/termux-tools_0.58_all.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/libnghttp2_1.35.0_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/ncurses_6.1.20181117_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/openssl_1.1.1a_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/binutils_2.31.1-3_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/libuv_1.24.0_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/cmake_3.13.1_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/git_2.19.2_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/libsqlite_3.25.3_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/gnupg_2.2.11_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/libtiff_4.0.10-1_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/graphicsmagick_1.3.31_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/libmosquitto_1.5.4_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/mosquitto_1.5.4_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/ncurses-ui-libs_6.1.20181117_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/nodejs-lts_8.13.0_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/openssh_7.9p1-1_aarch64.deb  404  Not Found
E: Failed to fetch https://its-pointless.github.io/files/dists/termux/extras/binary-aarch64/python2-numpy_1.15.4_aarch64.deb  404  Not Found
E: Failed to fetch https://its-pointless.github.io/files/dists/termux/extras/binary-aarch64/python2-scipy_1.2.0rc1_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/redis_5.0.2_aarch64.deb  404  Not Found
E: Failed to fetch https://termux.net/dists/stable/main/binary-aarch64/util-linux_2.33-1_aarch64.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

3399 cluster, the master and the worker how to configure?

3399 cluster, the master and the worker how to configure

I here the current configuration as follows, but no message processing

master(192.168.132.75):

$ cat runtime/embedding_aarch64.sh
#!/usr/bin/env bash
export RUNTIME_BASEDIR=`pwd`
export LD_LIBRARY_PATH=/system/lib64:$LD_LIBRARY_PATH:$PREFIX/lib64:/system/vendor/lib64/egl:/system/vendor/lib64
export DATA_RUNTIME_FOLDER=../model
export DEVICE_UUID_FILEPATH=/data/data/com.termux/files/home/.ro_serialno
export DEVICE_GROUP_ID_FILEPATH=/data/data/com.termux/files/home/.groupid.txt
export RUNTIME_BASEDIR=/data/data/com.termux/files/home/runtime
export CLUSTER_REDIS_ADDRESS=192.168.132.35
export CLUSTER_REDIS_PORT=6379
export CLUSTER_CONCURRENCY=2
cd bin
while [ 1 ]
do
    WORKER_TYPE=embedding REDIS_ADDRESS=localhost WORKER_BROKER=redis://localhost/0 ./embedding worker --loglevel INFO -E -n embedding -c 1 -Q embedding
    sleep 20
done

worker(192.168.132.132):

$ cat runtime/embedding_aarch64.sh
#!/usr/bin/env bash
export RUNTIME_BASEDIR=`pwd`
export LD_LIBRARY_PATH=/system/lib64:$LD_LIBRARY_PATH:$PREFIX/lib64:/system/vendor/lib64/egl:/system/vendor/lib64
export DATA_RUNTIME_FOLDER=../model
export DEVICE_UUID_FILEPATH=/data/data/com.termux/files/home/.ro_serialno
export DEVICE_GROUP_ID_FILEPATH=/data/data/com.termux/files/home/.groupid.txt
export RUNTIME_BASEDIR=/data/data/com.termux/files/home/runtime
export CLUSTER_REDIS_ADDRESS=192.168.132.35
export CLUSTER_REDIS_PORT=6379
export CLUSTER_CONCURRENCY=2
export CLUSTER_WORKERONLY=True
cd bin
while [ 1 ]
do
    WORKER_TYPE=embedding REDIS_ADDRESS=localhost WORKER_BROKER=redis://localhost/0 ./embedding worker --loglevel INFO -E -n embedding -c 1 -Q embedding
    sleep 20
done

local variable 'person_count' referenced before assignment

variable "person_count" referenced before assignment.
launched current nano branch on jetson nano
added token for telegram bot.
ran: run-on-nano.sh

face_detector | File "/root/detection/detector.py", line 220, in detect
face_detector | if person_count == 0:
face_detector | UnboundLocalError: local variable 'person_count' referenced before assignment
face_detector | [2022-01-16 21:53:49,867: INFO/MainProcess] Received task: upload_api-v2.detect[02779ca3-1f3d-4e21-968b-eda66e6aa7cf] expires:[2022-01-16 21:54:19.000863+00:00]
detector_plugin | error
detector_plugin | null
detector_plugin | add detect_task failed!!
face_detector | [2022-01-16 21:53:49,920: ERROR/ForkPoolWorker-1] Task upload_api-v2.detect[02779ca3-1f3d-4e21-968b-eda66e6aa7cf] raised unexpected: UnboundLocalError("local variable 'person_count' referenced
before assignment",)
face_detector | Traceback (most recent call last):
face_detector | File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 374, in trace_task
face_detector | R = retval = fun(*args, **kwargs)
face_detector | File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 629, in protected_call
face_detector | return self.run(*args, **kwargs)
face_detector | File "worker.py", line 52, in detect
face_detector | result = m.detect(image_path,trackerid, ts, cameraId, face_filter=None)
face_detector | File "/root/detection/detector.py", line 220, in detect
face_detector | if person_count == 0:
face_detector | UnboundLocalError: local variable 'person_count' referenced before assignment

Survey for development kit supply

Due to the hardware delivery will cost our extra effort, we want to know if this is needed.

Full set development kit will contain:

  • Rockchip RK3288 set-up-box with deep camera software 2GB mem, 8GB Flash
  • Dahua Camera

Please thumb up if you need it.

Getting started

Your project looks quite amazing and I'd love to have a play with it, but am not really sure where to start. I don't have a sufficiently capable Android device so would like to try the Docker build, but I don't really want to use Shinobi.

I'm unclear how DeepCamera interacts with Shinobi — would it be possible to use DeepCamera in conjunction with other apps such as MotionEye or Home Assistant?

Better site UI? (ymmv)

Is your feature request related to a problem? Please describe.
I'm always frustrated when line breaks are funky & tenses are incosistent.

Describe the solution you'd like
Change the text in the 2nd box in lifecycle.png: from PreProc [\n] essing to Pre- [\n] Process

... because it's not Labeling, Training, Model Deploying

Additional context
image

Linux/ubuntu support

Hi,

Can we use the platform on the linux ( ubuntu / deb ) instead of the android ? do you plan for this ?

Best

TfLite object detection doesn't work well on Android 8.0+

Describe the bug
Ijkplayer connect to RTSP camera, object detection can't detect person

To Reproduce
Steps to reproduce the behavior:

  1. Run DeepCamera
  2. Run IjkPlayer
  3. Connect IjkPlayer to RTSP camera
  4. On screen, there's number of person detected

Expected behavior
Person number should be 1 when there's 1 person

Runtime exception log

@lambda-zhang
Do you know how to fix this issue:

[2019-03-14 02:15:57,181: WARNING/ForkPoolWorker-1] motion_detect: Error,
[2019-03-14 02:15:57,181: WARNING/ForkPoolWorker-1] OpenCV(4.0.0-pre) /data/data/com.termux/files/home/opencv/modules/core/src/arithm.cpp:665: error: (-215:Assertion failed) type2 == CV_64F && (sz2.height == 1 || sz2.height == 4) in function 'arithm_op'
[2019-03-14 02:15:57,181: WARNING/ForkPoolWorker-1] Performance: motion_detect is 0.00202393531799S
[2019-03-14 02:15:57,182: WARNING/ForkPoolWorker-1] motion_result=False, (-1, -1) image_path=/storage/emulated/0/Download/frame_14032019_021557_128.jpg
[2019-03-14 02:15:57,182: WARNING/ForkPoolWorker-1] save_static_image: not save, interval=4.18020915985
[device] tid: 1552529756550 person num: 0 face num: 0 cost: 71
[2019-03-14 02:15:57,234: INFO/ForkPoolWorker-1] Task upload_api-v2.detect[0b08125a-182d-4723-8329-4a5a42525cf5] succeeded in 0.0718838829998s: '{"totalPeople": 0, "detected": false, "totalmtcnn": null, "ts": 1552529757151, "cropped": []}'
[2019-03-14 02:15:57,330: INFO/ForkPoolWorker-1] Task upload_api-v2.extract_v2[913b5665-4077-476d-8d7e-2ef57606da8d] succeeded in 0.607800769998s: '{"embedding_path": ""}'
uncaughtException { Error: ENOENT: no such file or directory, open ''
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.writeFileSync (fs.js:1299:33)
    at Result.<anonymous> (/data/data/com.termux/files/home/runtime/main.bin.js:1:12132)
    at emitOne (events.js:116:13)
    at Result.emit (events.js:211:7)
    at RedisClient.<anonymous> (/data/data/com.termux/files/home/runtime/node_modules/node-celery/celery.js:180:21)
    at emitThree (events.js:136:13)
    at RedisClient.emit (events.js:217:7)
    at return_pub_sub (/data/data/com.termux/files/home/runtime/node_modules/redis/index.js:794:18)
    at RedisClient.return_reply (/data/data/com.termux/files/home/runtime/node_modules/redis/index.js:833:9) errno: -2, code: 'ENOENT', syscall: 'open', path: '' }
/storage/emulated/0/Download/frame_14032019_021557_422.jpg

I'm debugging on Rockpro64 Android 7.1.2.

3288 need to rename folder code for 'sharpai'

3288 need to rename folder code for 'sharpai', because part of the script writing death sharpai, will compile error, 3399 there is no this problem, it is recommended that all folders to code for 'sharpai'

rk3399 ubuntu 16.04 build

how can i build this project in firefly rk3399 ubuntu 16.04 , to detected faces and upload to ftpserver , is it enable hardware accelerated to decode 1080p rtsp video,thank you!

face detection module is MTCNN?

I have check the source code of the project, I found that the module of face detection is MTCNN based on NCNN framework. Can you provide a TVM version of MTCNN to detect face? Thx a lot.

The latest code,3288 packing, always ‘No space left on device’

OSError: [Errno 28] No space left on device
cp: cannot stat '../src/embedding/judgeutil.so_termux_arch-linux_arm': No such file or directory
cp: cannot stat 'dist/classifier/*': No such file or directory
mkdir: cannot create directory '.termux/boot/': No space left on device
mkdir: cannot create directory '.minio': No space left on device
cp: cannot create regular file '.minio/': Not a directory
cp: cannot create regular file '.termux/boot/': Not a directory
chmod: cannot access '.termux/boot/termux_boot_sharpai_arm.sh': No such file or directory
creating sharpai-app.tgz ...
tar: .minio: No such file or directory
gzip: write error: No space left on device
tar: write error: Broken pipe
-rw------- 1 u0_a69 u0_a69 0 Mar 22 15:18 sharpai-app.tgz
$ 
$ 

run source code on rk3288 failed

followed https://github.com/SharpAI/DeepCamera/blob/master/docs/RunOnRK3288.md

rm: cannot remove '/root/.chushlogin': No such file or directory
rm: cannot remove '/root/.chushlogin'/bin/bash: line 0: cd: /data/data/com.termux/files/home/sharpai/src/embedding: No such file or directory
/bin/bash: line 0: cd: /data/data/com.termux/files/home/sharpai/src/face_detection: No such file or directory
: No such file or directory
WARNING: linker: libatomic.so: unused DT entry: type 0x6ffffef5 arg 0x398
WARNING: linker: /bin/bash: line 0: cd: /data/data/com.termux/files/home/sharpai/src/embedding: No such file or directory
[2019-03-27 15:39:58,898: WARNING/ForkPoolWorker-1] error of loading net2
[2019-03-27 15:39:58,905: ERROR/ForkPoolWorker-1] Signal handler <function setup at 0xadd397f0> raised: ImportError('No module named mxnet',)
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/celery/utils/dispatch/signal.py", line 227, in send
    response = receiver(signal=self, sender=sender, **named)
  File "upload_api-v2.py", line 1651, in setup
    mod = FaceProcessing.init_embedding_processor()
  File "/data/data/com.termux/files/home/DeepCamera/src/embedding/FaceProcessing.py", line 153, in init_embedding_processor
    import mxnet as mx
ImportError: No module named mxnet

Install checkup for requirements - Suggestion/Improvement

Enviroment : Jetson nano - 2GB version

The ./run-on-nano.sh script requires a check if the user has :

  • Has installed the correct version of docker-compose (1.27.4) , i had the 1.17 version and had to manually find from docker website the correct version, i also had problem with pip so a check up if docker is correctly installed before it executes the commands would be nice.
  • After running ./run-on-nano.sh start , jetson stopped responding since its 29GB memory got filled up, a check for sufficient storage before installing would be nice

Thanks for the great job you did i hope you implement my suggestions/improvements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.