Skip to main content

A versatile tool for daily use

Project description

detective:一款更适合中国宝宝的室友内卷监测工具

介绍

detective是一款更适合中国宝宝的室友内卷监测工具,它可以帮助你监测室友的内卷行为,让你的寝室生活更加和谐。

TODO:demo

环境要求

环境 版本
OS Ubuntu22.04, Raspberry Pi OS, Window11, Debian 12
Python 3.10

硬件清单

  • Raspberry Pi 4B * 2
  • 摄像头 * 2
  • 蜂鸣器
  • LED灯
  • 面包板

安装依赖

克隆仓库

git clone https://github.com/sergiudm/detective.git
cd detective

一键安装

./deploy.sh

手动安装

创建虚拟环境

conda create -n <your_env_name> python=3.10
conda activate <your_env_name>
pip install -r requirements.txt

使用说明

开始前,你需要配置config.json文件, 以下是一个示例:

{
    "default_detect_mode": "others",
    "use_camera": true,
    "LED_pin": 18, # LED灯的引脚
    "use_visualization": false, # 是否使用可视化
    "server_email": "youremail@example.com",
    "server_email_password": "your email password",# 请使用授权码
    "target_email": [
        "email1",
        "email2"
    ],
    "smtp_server":"your smtp server",
    "smtp_port": 587,
    "video_path": "assets/videos/sit.mp4", # use_camera为false时,使用该视频
    "image_path": "resources", # 邮件中的图片
    "send_delay": 13,
    "effective_detection_duration": 2,
    "max_num_hands": 2,
    "min_detection_confidence": 0.65,
    "min_tracking_confidence": 0.65
}

[!CAUTION] 实际使用时,请删除config.json中的所有注释!

Linux:

cd detective
sudo chmod +x run.sh
./run.sh

Windows:

cd detective
python main.py

功能

  • 检测是否有室友在内卷
    • 如果有,会自动响起警报,并且发微信通知你
  • 检测你是不是卷过头了
    • 如果连续工作超过2小时(可在config.json中配置),会自动响起警报,并提醒你休息一下
  • to do list
    • 检测 学习 与 玩游戏
      • 肩部、髋部、膝盖 夹角; 手部 位置
    • 报警:蜂鸣器(可换为便宜的喇叭)(直到结束学习才消失)、led、微信发消息
    • 开关门检测
      • 开关门 检测完成后: 人在寝室,才监控
    • 不良坐姿的检测
    • 魔术

如何贡献

本仓库仅使用了mediapipe中的人体姿态检测和手部检测功能,如果你有更多想法,欢迎:

  • 提交PR
  • 提交Issue
  • 传播给更多的室友

Acknowledgement

mediapipe

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

detective_pi-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

detective_pi-0.1.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file detective_pi-0.1.0.tar.gz.

File metadata

  • Download URL: detective_pi-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for detective_pi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 719db246d9437177c172d7c276fab3d993734512490e7cdf050afcbad9412726
MD5 498c8d4cdd4b5e94b3ba7a7b9116623d
BLAKE2b-256 1fb4708b4cae32f3a55a93d8e9a43e03171afeec9e61e28b646c013a85724fc5

See more details on using hashes here.

File details

Details for the file detective_pi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: detective_pi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for detective_pi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a456a7e59ab60bd78c1de0a1847fc42459cea2cf796679423c6a9ef29436a532
MD5 1a327aed9efb1ba3d9165181f04e2d9a
BLAKE2b-256 cdc54bfe2dab5334bf828098e00fe0723d2aef97d223ca0119aeb8d051fe27c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page