Coder Social home page Coder Social logo

kingstar788 / deepcamera Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sharpai/deepcamera

0.0 0.0 0.0 123.44 MB

AI Face Recognition/Person Detection NVR. Machine Learning On The Edge, turn your Camera into AI-powered with Jetson Nano and telegram to protect your privacy.

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

License: MIT License

Shell 1.74% Python 46.84% JavaScript 22.16% Mako 0.01% HTML 0.02% C 0.22% CMake 2.20% C++ 24.83% Dockerfile 0.35% Makefile 0.71% Cuda 0.92%

deepcamera's Introduction

AI Face Recognition/Person Detection NVR

Machine Learning On The Edge, Turn your Camera into AI-powered with Edge AI device

SharpAI is open source stack for machine learning engineering with private deployment and AutoML for edge computing. DeepCamera is application of SharpAI designed for connect computer vision model to surveillance camera. Developers can run same code on Raspberry Pi/Android/PC/AWS to boost your AI production development.

Features

  • FFMpeg with Nvidia Nano hardware decoder
  • Face Detector with Nvidia Nano GPU TensorRT MTCNN
  • Face Embedding with Nvidia Nano GPU Pytorch InsightFace
  • Person Detection with GPU
  • Integrate with telegram bot API

DeepCamera Architecture

architecture

Demo On Youtube

Demo On Youtube

Get Started on Jetson Nano

Install Docker-compose

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

Get source code

git clone https://github.com/SharpAI/DeepCamera

Create Token for Telegram Bot

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

Start DeepCamera

cd DeepCamera  
./run-on-nano.sh start

Connect To Camera through RTSP URL

On Jetson Nano, Access to 8080 port. http://localhost:8080
Default username and password is:
username: [email protected]
password: SharpAI2018

Tested Camera: DaHua / Lorex / AMCREST, URL Path: /cam/realmonitor?channel=1&subtype=0 Port: 554

When setup done, you will see live view on web page, when detected person in camera, you will receive video clips on telegram.

Label on Web GUI, train face recognition model on device

cat docker/workaipython/ro_serialno 
82f28703d001

82f28703d001 is device ID.

Access http://165.232.62.29:3000/

how to config on web gui

Use Mobile APP to label and train face recognition model on device

Get device serial number

cat docker/workaipython/ro_serialno 
82f28703d001

82f28703d001 is device ID.
Generate QRCode of device ID

Download and install SharpAI Mobile APP

Develop your own Application GUI with DeepCamera API Server

If you don't like the GUI or you want to develop your own application.
You can use following API:

Get device serial number

cat docker/workaipython/ro_serialno 
82f28703d001

82f28703d001 is device ID

Create User on API Server

REST API:

curl -X POST -H "Content-type: application/json" http://localhost:3000/api/v1/sign-up -d '{"username": "test11", "email": "[email protected]", "password": "xxxxxx"}'

Response:

{
  "success": true
}

Get Token of created user

REST API:

curl -X POST -H "Content-type: application/json" http://localhost:3000/api/v1/login/ -d '{"username": "test11", "email": "[email protected]", "password": "123456"}'

Response:

{
  "status": "success",
  "data": {
    "authToken": "t6QsPaU3VdbfUQMkNIf6I3MDtox29WLrPJRAKkOCfpc",
    "userId": "tiK8RYG87sGJAErdB"
  }
}

Create Group on API Server

Rest API:

Fill in X-Auth-Token and X-User-Id in previous response.

curl -X POST -H "X-Auth-Token: t6QsPaU3VdbfUQMkNIf6I3MDtox29WLrPJRAKkOCfpc" -H "X-User-Id: tiK8RYG87sGJAErdB" http://localhost:3000/api/v1/groups -d "name=group01"

Response:

{
  "groupId": "e309ff8c7a3a8ceb4011e86e"
}

Add device to Group on API Server

REST API: Replace X-Auth-Token and X-User-Id. Replace group id in requesting URL: http://localhost:3000/api/v1/groups/`e309ff8c7a3a8ceb4011e86e`/devices

curl -X POST -H "X-Auth-Token: t6QsPaU3VdbfUQMkNIf6I3MDtox29WLrPJRAKkOCfpc" -H "X-User-Id: tiK8RYG87sGJAErdB" -H "Content-type: application/json" http://localhost:3000/api/v1/groups/e309ff8c7a3a8ceb4011e86e/devices -d '{"uuid": "82f28703d001", "deviceName": "testDevice", "name":"testdevice","type": "inout"}'

Response:

{
  "success": true
}

Then restart DeepCamera service.

API Server document can be found here: SharpAI/ApiServer

You can also develop/debug code on your PC How to run DeepCamera On PC

Deploy your own API_Server on X86/Cloud Server

Now, you got the idea of DeepCamera,
the public testing server is open to the internet.
You can deploy your own API server on your OWN device.

git clone https://github.com/SharpAI/DeepCamera
cd DeepCamera
./start-cloud.sh start

You need ip address of private cloud server on next step (replace ip address to <Server_IP> on next step).
If you don't want to setup your own server for now, a test server can be used for evaluation, the ip address of test server is 165.232.62.29

If your have any question or feature request, please feel free to join slack for commercial support

Slack

Click to join sharpai slack channel

Todo List

  • Porting to Jetson Nano
  • High accurate Face Recognition
  • Face Detection
  • Inference on ARM Mali GPU
  • Support Android TF Lite(GPU/CPU/NPU)
  • Support open source embedded linux
  • Control from mobile application
  • Management System for devices
  • Push Notification to Mobile Device
  • Object Detection
  • Distributed System based on celery
  • Plugin to process video by Shinobi CCTV
  • Application on Android to decode video with hw acc
  • Motion Detection with Android GPU
  • Lable and train from Mobile to Edge Device
  • Native raspberry pi camera support
  • Labelling server and application is down, need BYOD document API server repo
  • Image upload to AWS or on premise AWS compatiable server(MINIO)

deepcamera's People

Contributors

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

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.