{"id":21017998,"url":"https://github.com/sthysel/dedrowse","last_synced_at":"2026-04-17T10:33:20.504Z","repository":{"id":138850300,"uuid":"91325118","full_name":"sthysel/dedrowse","owner":"sthysel","description":"Dedrowse is a drowsiness monitor","archived":false,"fork":false,"pushed_at":"2020-09-07T01:12:10.000Z","size":71296,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-01T07:21:57.770Z","etag":null,"topics":["opencv","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sthysel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-15T10:24:41.000Z","updated_at":"2020-09-15T02:37:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4dc5148-c414-4519-be4e-811954b560fb","html_url":"https://github.com/sthysel/dedrowse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sthysel/dedrowse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthysel%2Fdedrowse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthysel%2Fdedrowse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthysel%2Fdedrowse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthysel%2Fdedrowse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sthysel","download_url":"https://codeload.github.com/sthysel/dedrowse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthysel%2Fdedrowse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31925512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:19:20.377Z","status":"ssl_error","status_checked_at":"2026-04-17T10:19:18.682Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opencv","python"],"created_at":"2024-11-19T10:23:06.851Z","updated_at":"2026-04-17T10:33:20.478Z","avatar_url":"https://github.com/sthysel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dedrowse is a drowsiness detector\n\nDedrowse is a computer vision system that can automatically detect operator\ndrowsiness in a real-time video stream and raise an alarm if the operator seems\nto be drowsy. A operator may be a truck driver or a crane operator, or long\ndistance driver.\n\nIt is built on work by [Adrian Rosebrock](http://www.pyimagesearch.com/2017/05/08/drowsiness-detection-opencv/)\n\n\n```zsh\n\nUsage: dedrowse [OPTIONS]\n\n  Dedrowse drowsines detector\n\nOptions:\n  -p, --shape-predictor TEXT  Path to facial landmark predictor  [default: /ho me/thys/workspace/bhp/si/dedrowse/src/dedrowse/d ata/face.dat]\n  -e, --blink-ratio FLOAT     Eye aspect ratio indicating blink  [default: 0.3]\n  -t, --trigger INTEGER       The number of consecutive frames the eye must be below the threshold for to set off the alarm [default: 48]\n  -s, --set-alarm TEXT        Sound the Alarm  [default: True] --alarm-sound TEXT          Alarm sound file  [default: /home/thys/workspace /bhp/si/dedrowse/src/dedrowse/data/alarm.wav]\n  -m, --alert-msg TEXT        Alert message  [default: DROWSINESS DETECTED]\n  -c, --webcam INTEGER        Webcam number  [default: 0]\n  -w, --frame-width INTEGER   Width of visualization frame  [default: 850]\n  --print-knobs               Print knobs  [default: False]\n  --help                      Show this message and exit.\n\n```\n\nIt works by assuming a drowsy face's eyes are closer that normal\n\n![Open](docs/open.png)\n\n\n![Close](docs/close.png)\n\n\n# Config\n\nThe follwing environmental variables can be set in the envrionment, or loaded\nfrom a .env file.\n\n```zsh\n\n#DEBROWSE_ALARM=True\n#DEBROWSE_AR_CONSEC_FRAMES=48\n#DEBROWSE_BLINK_ASPECT_RATIO=0.3\n#DEBROWSE_FRAME_WIDTH=850\n#DEBROWSE_SHAPE_PREDICTOR=/home/thys/workspace/dedrowse/src/dedrowse/data/face.dat\n#DEBROWSE_WEBCAM=0\n#DEDROWSE_ALARM_SOUND_PATH=/home/thys/workspace/dedrowse/src/dedrowse/data/alarm.wav\n#DEDROWSE_ALERT_MESSAGE=DROWSINESS DETECTED\n\n```\n\n\n# Install\n\nTested on a modern Arch Linux install Using Python 3.7 and OpenCV 4.0. Older\nPython and OpenCV versions was also shown to work.\n\nCheck out source, enter repo and do:\n\n```zsh\n\n$ python -m venv ~/.virtualenvs/dedrowse\n$ source ~/.virtualenvs/dedrowse/bin/activate\n$ pip install -e .\n\n```\n\nA devpi, rpm, deb or docker image can be arranged if required.\n\n## Old pre-OpenCV 4 Notes\nThis system is built arround opencv, numpy and scipy. On Arch its important to use the\npre-built Python wrappers that supports the FFMpeg video stream handling. So use the sytem\nsite packages as installed by pacman. Not python-opencv that ships a pre-built opencv lib in the\nwheel that does not have mgeg video streaming support compiled in.\n\n# System dependencies\n\nArch Linux:\n\n```bash\n$ sudo pacman -S cmake boost\n```\n\n## Development\n\n```bash\n$ mkvirtualenv --system-site-packages dedrowse\n$ pip install -r requirement.txt\n$ pip install -e .\n```\n\n\n# Resources\n\n* Built on work from http://www.pyimagesearch.com/2017/05/08/drowsiness-detection-opencv/\n* https://vision.fe.uni-lj.si/cvww2016/proceedings/papers/05.pdf\n* Alarm sounds from http://soundbible.com/tags-alarm.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsthysel%2Fdedrowse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsthysel%2Fdedrowse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsthysel%2Fdedrowse/lists"}