Code Monkey home page Code Monkey logo

human-detection's Introduction

Human Intrusion Detection System

Demo

Giới thiệu

Repo này tập trung vào việc phát triển một hệ thống phát hiện xâm nhập dựa trên luồng video trực tiếp từ camera (giao thức RTSP). Xử lý bằng máy tính có hiệu năng thấp, đặc biệt được thiết kế để sử dụng trên các thiết bị như máy thu ngân. Hệ thống này có khả năng hiển thị video real-time với độ trễ khoảng 1-2 giây và hỗ trợ gửi thông báo qua tin nhắn Telegram khi phát hiện sự xâm nhập.

Đặc điểm chính

  • Đọc luồng video trực tiếp từ camera (RTSP)
  • Sử dụng mô hình YOLOv5n để phát hiện và nhận diện người trong video.
  • Train mô hình dưới bộ dữ liệu chứa khoảng 2000 ảnh người được trích từ dataset COCO.
  • Áp dụng kỹ thuật multiprocess để giảm độ trễ trong việc stream video real-time và phát hiện xâm nhập.
  • Sử dụng Flask để hiển thị video trên Web

Cài đặt và Sử dụng

  1. Cài đặt các package cần thiết

    • Có thể cài dặt các pakage theo file requeriment ở folder yolov5
    • Cài thêm pakage để đọc config từ file .env và Flask để stream video lên web
  2. Tạo dataset từ COCO

    • Sử dụng dataset COCO trên Kaggle, tách những ảnh có classes person để train mô hình.
  3. Train YOLOv5n

    • Sử dụng GPU free trên Kaggle, huấn luyện mô hình YOLO, nếu như máy inference đủ mạnh, có thể sử dụng các scale khác của mô hình như là s, l, etc.
  4. Cấu hình Telegram:

    • Đăng ký bot với Telegram và lấy API key.
    • Cung cấp thông tin API key trong file cấu hình.
  5. Khởi động hệ thống:

    • Chạy lệnh python main.py để bắt đầu streaming và phát hiện xâm nhập.

Demo

Một số hình ảnh thông báo nhận được khi có người được phát hiện.
image image

human-detection's People

Contributors

chithang-50cent avatar

Watchers

 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.