{"id":22096154,"url":"https://github.com/blessedrebus/linux-face-login","last_synced_at":"2025-09-12T19:36:21.022Z","repository":{"id":107045116,"uuid":"561399786","full_name":"BlessedRebuS/Linux-Face-Login","owner":"BlessedRebuS","description":"Enabling face authentication on Linux and Raspberry boards","archived":false,"fork":false,"pushed_at":"2023-01-11T15:57:29.000Z","size":269017,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"raspberry","last_synced_at":"2025-03-24T00:56:15.189Z","etag":null,"topics":["docker","linux","opencv","pam","raspberry-pi","raspberrypi","raspbian"],"latest_commit_sha":null,"homepage":"","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/BlessedRebuS.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":"2022-11-03T15:55:10.000Z","updated_at":"2025-03-19T14:48:53.000Z","dependencies_parsed_at":"2023-05-24T22:45:12.920Z","dependency_job_id":null,"html_url":"https://github.com/BlessedRebuS/Linux-Face-Login","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BlessedRebuS/Linux-Face-Login","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlessedRebuS%2FLinux-Face-Login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlessedRebuS%2FLinux-Face-Login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlessedRebuS%2FLinux-Face-Login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlessedRebuS%2FLinux-Face-Login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlessedRebuS","download_url":"https://codeload.github.com/BlessedRebuS/Linux-Face-Login/tar.gz/refs/heads/raspberry","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlessedRebuS%2FLinux-Face-Login/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274864293,"owners_count":25364230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","linux","opencv","pam","raspberry-pi","raspberrypi","raspbian"],"created_at":"2024-12-01T04:09:49.033Z","updated_at":"2025-09-12T19:36:20.965Z","avatar_url":"https://github.com/BlessedRebuS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facial-Recognition-PAM\nProgetto di Sistemi Digitali per Ingegneria Informatica Magistrale Unibo.\nLa versione qui presentata è la versione per Rasperry Pi 3b.\n\n\u003cp\u003e\n\u003cimg src=\"presentazione/raspberry/45deg.jpeg\" width=\"326\"\u003e\n\u003cimg src=\"presentazione/raspberry/circuit.png\" width=\"300\"\u003e\n\u003c/p\u003e\n\n## Requisiti\n\nPer riuscire ad esegurie una demo del progetto è necessario disporre di un Raspberry (modello 3-4) di una webcam USB o un modulo webcam con cavo flat, [installare docker](https://docs.docker.com/get-docker/) e avere i permessi di root sul proprio sistema.\n\n## Installazione immagine pre-buildata dal [registry](https://hub.docker.com/u/blessedrebus)\n\nPer scaricare l'immagine già fatta (aarch64)\n\n`docker pull blessedrebus/debian-pam:armv8`\n\nEd avviare il container con \n\n`sudo docker run --privileged -p 1234:22 -it -d --name PAM blessedrebus/debian-pam:armv8`\n\n## Installazione automatica\n\n`chmod +x install.sh \u0026\u0026 ./install.sh`\n\n## Installazione manuale\n\nBuild Dockerfile\n\n`sudo docker build . -t debian-pam:test`\n\nRun docker image (**1234** host : **22** container)\n\n`sudo docker run --privileged -p 1234:22 -it -d --name PAM debian-pam:test`\n\nEntrare dentro il container con\n \n`sudo docker exec -it PAM /bin/bash`\n \n## Testing\n\n1) Entrare da dentro il container nella cartella /root/src\n2) Registrare il volto per l'utente \"test\" con il comando `python3 facial_signup_novideo.py test`. Posizionarsi davanti alla webcam e una volta stabili, premere la barra spaziatrice per salvare la foto.\n3) Usare il comando `login` ed inserire come username \"test\". Se tutto è configurato correttamente il login avverrà tramite sblocco facciale. Se si proverà a loggare con l'utente \"obama\" si verrà rifiutati perché la faccia non corrisponde.\n\n## Uninstalling\n\nPer rimuovere il container e l'immagine\n\n`chmod +x uninstaller.sh \u0026\u0026 ./uninstaller.sh`\n\n## Scelte Progettuali\n\n### Perché Docker?\nGrazie all'uso di Docker è possibile testare il sistema in modo \"sicuro\", ovvero non si va a modificare il comportamento di login di default di Linux. In più utilizzando una sola immagine Docker su una distribuzione prestabilita come Debian, è possibile distribuire la stessa versione di test. Sul registry sono presenti due release: una con architettura **[amd64](https://hub.docker.com/layers/blessedrebus/debian-pam/v1/images/sha256-7b49cc928e195c6dd9fe561525681e1a4c6ea2d3ed64a62b7389f0f9ff206891?context=explore)** e una con architettura **[aarch64](https://hub.docker.com/layers/blessedrebus/debian-pam/armv8/images/sha256-0d34e5de41e3b6b2e45a15a2941253d9605f87f1b46d0383439114677cd8ae26?context=explore)** per eseguire l'applicazione sia su sistemi Linux classici, sia su Raspberry Pi 3/4 ed Apple Silicon. Si può accedere alla webcam utilizzando la flag `--privileged` durante il run dell'immagine Docker. In alternativa è possibile specificare direttamente il device con `--device=/dev/videoX:/dev/video0`, sostituendo X al numero del device USB che identifica la webcam. Per avere il corretto funzionamento su Raspberry è consigliato esegurie con la flag \"privileged\" in modo da accedere a tutti i pin GPIO.\n\n## Abstract\nIl progetto si basa su PAM (Pluggable Authentication Module), ovvero un sistema a moduli che è alla base dell’ autenticazione nei moderni sistemi Linux.\nPAM è unito al processamento delle immagini ottenute da un flusso di dati registrati da una webcam.\nGli utenti si registreranno con la propria faccia allenando una rete neurale che andrà a costruire un modello da seguire per lo sblocco facciale. Una volta riconosciuti gli utenti tramite la webcam, il sistema si occuperà di effettuare il login.\nIl progetto è sviluppato su Raspberry Pi tramite un modulo webcam, che si occuperà di trasferire le informazioni video al Raspberry, ma può essere esteso a una implementazione su webcam integrata in un qualunque sistema Linux. \nPer la nostra implementazione useremo un Raspberry Pi 3, come sistema operativo Debian GNU/Linux 11 (bullseye) ARM e un modulo webcam che si inserisce con un connettore al Raspberry tramite un cavo piatto flessibile.\n\n---\n\n### Documentazioni:\nNo password login\nhttps://wiki.archlinux.org/title/LightDM#Enabling_interactive_passwordless_login\n\nWebcam passtrough\nhttps://stackoverflow.com/questions/44852484/access-webcam-using-opencv-python-in-docker\n\nFake display\n1) https://askubuntu.com/questions/453109/add-fake-display-when-no-monitor-is-plugged-in\n\n2) https://sick.codes/xfce-inside-docker-virtual-display-screen-inside-your-headless-container/\n\nRaspberry Pinout\nhttps://www.raspberrypi.com/documentation/computers/raspberry-pi.html\n\nI2C Screen\nhttps://www.raspberrypi-spy.co.uk/2018/04/i2c-oled-display-module-with-raspberry-pi/\n\n### Documentazioni PAM:\nhttps://github.com/devinaconley/pam-facial-auth\n\nhttps://github.com/beatgammit/simple-pam\n\nhttps://ben.akrin.com/2-factor-authentication-writing-pam-modules-for-ubuntu/\n\nhttps://wiki.archlinux.org/title/PAM\n\n### Documentazioni OpenCV\nhttps://realpython.com/face-recognition-with-python/\n\nhttps://pysource.com/2021/08/16/face-recognition-in-real-time-with-opencv-and-python/\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblessedrebus%2Flinux-face-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblessedrebus%2Flinux-face-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblessedrebus%2Flinux-face-login/lists"}