{"id":29272815,"url":"https://github.com/nightgrey/aether","last_synced_at":"2025-07-05T01:10:45.734Z","repository":{"id":231595882,"uuid":"781754191","full_name":"nightgrey/aether","owner":"nightgrey","description":"A web app for local background removal with AI.","archived":false,"fork":false,"pushed_at":"2024-04-20T08:37:34.000Z","size":921,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-21T10:14:33.962Z","etag":null,"topics":["ai","rembg","rembg-frontend","remix-run","tailwindcss","transformersjs","typescript"],"latest_commit_sha":null,"homepage":"https://aether.nco.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nightgrey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-04-04T01:05:01.000Z","updated_at":"2024-04-20T08:37:38.000Z","dependencies_parsed_at":"2024-04-04T20:28:57.455Z","dependency_job_id":"0805a8ee-9531-41a5-8251-d8079176c5cc","html_url":"https://github.com/nightgrey/aether","commit_stats":null,"previous_names":["nightgrey/aether"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nightgrey/aether","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightgrey%2Faether","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightgrey%2Faether/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightgrey%2Faether/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightgrey%2Faether/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nightgrey","download_url":"https://codeload.github.com/nightgrey/aether/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightgrey%2Faether/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263641619,"owners_count":23493422,"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","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":["ai","rembg","rembg-frontend","remix-run","tailwindcss","transformersjs","typescript"],"created_at":"2025-07-05T01:10:44.983Z","updated_at":"2025-07-05T01:10:45.719Z","avatar_url":"https://github.com/nightgrey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aether\n\n![Screenshot](screenshot.png)\n\nHey! This is Aether, a small web app that removes backgrounds from images with AI. It's built with:\n\n* [BRIA AI's RMBG-1.4](https://huggingface.co/briaai/RMBG-1.4)\n* [transformers.js](https://github.com/xenova/transformers.js)\n* [Remix.run](https://remix.run)\n* [Tailwind CSS](https://tailwindcss.com)\n* [Lucide Icons](https://lucide.dev)\n* [Vercel](https://vercel.com)\n\n... and some sweat. Thanks to the authors of the libraries and tools used in this project!\n\nThe project is neither tested nor well commented, sorry about that. 😅\n\n## Challenges and Learnings\n\nThe most challenging part of this project was to make the AI model work in the browser. Getting it to run wasn't too\nhard with `onnxruntime-web`, but...\n\nI had to learn a lot about how to handle the various image data types (`ImageData`, `ImageBitmap`, `CanvasImageSource`, `Uint8Array`, `Float32Array`, etc.) and not only the conversion\nbetween binary data and tensors, but also the conversion between different tensor formats (NHWC, NCHW, etc.), image\nformats (masks vs. RGBA) as well as resizing, handling the alpha channel, and working with Canvas. You have to fit the\ninput to the model's specific needs (`[N, 1, 1024, 1024]`), and the output to the next step's requirements, and so on. A lot of that is reflected in `app/components/features/rembg` and `app/components/shared/image.ts`.\n\nI later switched to `transformers.js` because even though it worked when using `onnxruntime-web` directly, it failed on\niOS and Android without any exception or log. After some debugging, I switched to `transformers.js`. I'm aware they use\nONNX and Tensorflow.js under the hood, but it probably does so better than I do 😁 It provides ready-made pipelines, but\nin this case, it didn't yet support `SegformerForSemanticSegmentation` in the image segmentation pipeline, which was\nnecessary for BRIA AI's RMBG-1.4 model. But! I still could use the right pre-processing manually, so I only had to do\nthe post processing.\n\nAs a plus, it now caches properly, works everywhere, and is even faster! Thanks to [xenova](https://github.com/xenova),\nwho made `transformers.js` ❤️\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightgrey%2Faether","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightgrey%2Faether","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightgrey%2Faether/lists"}