{"id":29768183,"url":"https://github.com/causeri3/selfusion-pi","last_synced_at":"2026-05-09T06:06:52.334Z","repository":{"id":299259205,"uuid":"1002498838","full_name":"causeri3/selfusion-pi","owner":"causeri3","description":"Art installation for Fusion 2025 - automated selfies, diffuser transformation, raspberry pi","archived":false,"fork":false,"pushed_at":"2025-07-25T12:38:42.000Z","size":84684,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-25T19:13:10.626Z","etag":null,"topics":["automated-selfie","diffuser","face-detection","fusion","mini-computer","neural-style-transfer","nst","raspberry-pi","raspberry-pi-5","raspberrypi","sdxl-turbo","single-board-computer","stable-diffusion","yolov8"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/causeri3.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,"zenodo":null}},"created_at":"2025-06-15T15:51:21.000Z","updated_at":"2025-07-25T12:38:46.000Z","dependencies_parsed_at":"2025-06-15T16:56:15.547Z","dependency_job_id":"3ef94b38-9de9-4764-8f45-1f693eb3fc9a","html_url":"https://github.com/causeri3/selfusion-pi","commit_stats":null,"previous_names":["causeri3/raspberry-pi","causeri3/selfusion-pi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/causeri3/selfusion-pi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/causeri3%2Fselfusion-pi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/causeri3%2Fselfusion-pi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/causeri3%2Fselfusion-pi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/causeri3%2Fselfusion-pi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/causeri3","download_url":"https://codeload.github.com/causeri3/selfusion-pi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/causeri3%2Fselfusion-pi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["automated-selfie","diffuser","face-detection","fusion","mini-computer","neural-style-transfer","nst","raspberry-pi","raspberry-pi-5","raspberrypi","sdxl-turbo","single-board-computer","stable-diffusion","yolov8"],"created_at":"2025-07-27T03:01:08.471Z","updated_at":"2026-05-09T06:06:52.322Z","avatar_url":"https://github.com/causeri3.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selfusion\n### Repository for an art installation  \n*(made for Fusion / Bornhack 2025)*\n\n---\n*for CCC*: Check out http://151.219.244.125:8000/docs\n\n---\n\nTakes automated selfies, generates more pictures from that, and plays a bouncing gif. \n\n---\n#### Online Mode Example\nhttps://github.com/user-attachments/assets/008ab640-0a8f-4742-81ea-54a7783c44f8\n\n#### Offline Mode Examples\n\u003cimg src=\"https://github.com/user-attachments/assets/a17bf85d-27f7-4f19-9231-2703db1c9837\" width=\"300\"/\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/29be4ae7-0691-4209-a8de-552207df9c77\" width=\"300\"/\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/6d96d362-f0e3-45b4-bb49-d5ce5d6ce572\" width=\"300\"/\u003e\n\n\n#### Waiting Screens\n\u003cimg width=\"300\" alt=\"Screenshot 2025-07-03 at 08 17 57\" src=\"https://github.com/user-attachments/assets/e3fb49f1-9c1f-4b36-a833-9721a986f01b\" /\u003e\n\n\u003cimg width=\"300\" alt=\"Screenshot 2025-07-03 at 08 43 01\" src=\"https://github.com/user-attachments/assets/09dd3baf-1b9b-4031-8606-a2e41b961b8f\" /\u003e\n\n---\n\nUsing:\n- **Automated Selfies**: Yolov8 trained by [arnabdhar](https://huggingface.co/arnabdhar/YOLOv8-Face-Detection)\n- **Offline image generation**: Neural Style Transfer [deepeshdm](https://github.com/deepeshdm/PixelMix/tree/main)\n- **Online image generation**: [Stable Diffusion XL Turbo](https://huggingface.co/stabilityai/sdxl-turbo) in repo [sdxlturbo-api](https://github.com/causeri3/sdxlturbo-api)\n\n---\n## Settings / Args\nSee all arguments:\n* with uv `uv run selfusion.py --help`\n* standard `python selfusion.py --help`\n\nMost interesting settings you will find in `selfusion_utils.args`, such as:  \n- gif delay  \n- waiting time  \n- loading bar time  \n- come closer screen or not\n- face size threshold\n- yolo settings (confidence, IoU)\n- diffuser settings (strength, inference steps, prompt ...)\n\n\n---\nAnother bit that's might be fun: Adding more style pictures — they are picked randomly.  \nYou can find them in `neural_style_transfer.style_images`.\n\n---\n## Hardware\n- Raspberry Pi 5 (16GB)\n\n---\n## Software\n### Dependencies\n\n#### SDXLTurbo API\nIt's meant to work with [sdxlturbo-api](https://github.com/causeri3/sdxlturbo-api) hosted on some machine (runs well with mps on my Mac or cuda on a cloud VM with GPU - if you want you can test just the sdxlturbo code straight on Colab with T4, was super easy).\n\nAnyway, it still has offline functionality. If it cannot get results from the Stable diffusion API, it generates pictures with neural style transfer on the local machine / the pi.\n\n\n#### Linux\n\n```bash\nsudo apt-get install libgtk2.0-dev pkg-config\n```\n\n#### Python\nThe raspberry had `python 3.11` preinstalled\n\n```bash\npip install -r requirements.txt\n```\nGets it running.\n\nOr even better if you use [uv](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_1), run in the directory of this repo:\n```sh\nuv venv --python 3.11\nuv pip install -r requirements.txt\n```\n**Note**:\nSome of the code in this repo was used for experimentation (such as the `stable-diffusion` folder or `yolo_onnx_openvino.py`, they need more dependencies, so most directories have their own requirements files)\n\n---\n## Run\n* with uv\n `uv run selfusion.py`\n\n* standard\n `python selfusion.py`\n\n### Systemd\n\nI run it as systemd service:\n```\n[Unit]\nDescription=Fusion Raspberry Process\nAfter=graphical-session.target\n\n[Service]\nType=simple\nWorkingDirectory=/home/pi/src/raspberry-pi\nExecStart=/home/pi/src/selfusion_venv/bin/python /home/pi/src/selfusion/selfusion.py\nRestart=on-failure\nRestartSec=5\nEnvironment=DISPLAY=:0\nEnvironment=XAUTHORITY=/home/pi/.Xauthority\n\n[Install]\nWantedBy=default.target\n```\nthat file goes under:\n`~/.config/systemd/user/fusion.service`\n\n**run service**\n```bash\nsystemctl --user daemon-reload\nsystemctl --user enable fusion.service\nsystemctl --user start fusion.service\n```\n\n\n\n---\nThis project is licensed under AGPL v3+\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcauseri3%2Fselfusion-pi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcauseri3%2Fselfusion-pi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcauseri3%2Fselfusion-pi/lists"}