{"id":19505572,"url":"https://github.com/bogdaaamn/coffee-cup-detect-runner","last_synced_at":"2026-05-15T00:37:31.089Z","repository":{"id":244127578,"uuid":"814346675","full_name":"bogdaaamn/coffee-cup-detect-runner","owner":"bogdaaamn","description":"Application that runs an object detection model using Edge Impulse on Linux. It saves the moments when you hold a coffee cup longer than 3 seconds in a Supabase database","archived":false,"fork":false,"pushed_at":"2024-06-12T20:42:37.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T10:46:25.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/bogdaaamn.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":"2024-06-12T20:41:01.000Z","updated_at":"2024-06-12T20:42:40.000Z","dependencies_parsed_at":"2024-06-13T02:59:50.924Z","dependency_job_id":null,"html_url":"https://github.com/bogdaaamn/coffee-cup-detect-runner","commit_stats":null,"previous_names":["bogdaaamn/coffee-cup-detect-runner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdaaamn%2Fcoffee-cup-detect-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdaaamn%2Fcoffee-cup-detect-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdaaamn%2Fcoffee-cup-detect-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdaaamn%2Fcoffee-cup-detect-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bogdaaamn","download_url":"https://codeload.github.com/bogdaaamn/coffee-cup-detect-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240754367,"owners_count":19852189,"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":[],"created_at":"2024-11-10T22:31:49.548Z","updated_at":"2026-05-15T00:37:31.060Z","avatar_url":"https://github.com/bogdaaamn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edge Impulse to Supabase on Linux\n\nThis is an application that runs an object detection model using Edge Impulse on Linux. It stores every moment when you hold a coffee cup longer than 3 seconds in a Supabase database.\n\nIt is heavily based on the Edge Impulse [example-linux-with-twilio](https://github.com/edgeimpulse/example-linux-with-twilio) example application.\n\n## Edge Impulse\n\nTo run this application you need a [development board](https://docs.edgeimpulse.com/docs/raspberry-pi-4) that supports Edge Impulse. You need to train an [object detection model](https://docs.edgeimpulse.com/docs/tutorials/end-to-end-tutorials/object-detection/object-detection) that detects coffee cups. You need camera available on the board to run this model.\n\nOnce you have a trained model, install the [edge-impulse-linux](https://docs.edgeimpulse.com/docs/edge-ai-hardware/cpu/raspberry-pi-4#id-2.-installing-dependencies) libraries to get your model running.\n\n## Supabase\n\nTo send data to the database, you need a Supabase project.\n\nYou can head over to [database.new](https://database.new/) to create a new Supabase project. When your project is up and running, navigate to the project's [SQL Editor](https://supabase.com/dashboard/project/_/sql/new) and paste in the following snippet:\n\n```\ncreate table detections (\n  id uuid NOT NULL DEFAULT uuid_generate_v4(),\n  created_at timestamp with time zone not null default current_timestamp,\n  message text\n);\n```\n\nThis will create a `detections` table in which you can insert rows every time, for example, a coffee cup is detected.\n\nAlternatively, you can manually navigate to your project's [Table Editor](https://supabase.com/dashboard/project/_/editor) and configure the table manually.\n\n## Development\n\n1. Download the trained model to your device, [more details here](https://docs.edgeimpulse.com/docs/edge-ai-hardware/cpu/raspberry-pi-4#deploying-back-to-device)\n\n```\n$ edge-impulse-linux-runner --download model.eim\n```\n\n2. Clone this repository\n\n```\n$ git clone https://github.com/bogdaaamn/coffee-cup-detect-runner\n```\n\n3. Install the dependencies, make sure you have [Node and npm installed](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) on your device\n\n```\n$ npm install\n```\n\n4. Create an `.env` file (see `.env.example`) and copy the Supabase credentials, [more details here](https://supabase.com/docs/guides/getting-started/quickstarts/nextjs)\n\n```\nSUPABASE_URL=\u003cSUPABASE_URL\u003e\nSUPABASE_ANON_KEY=\u003cSUPABASE_ANON_KEY\u003e\n```\n\n5. Start the application\n\n```\n$ npm run build\n$ npm start\n```\n\n6. Additionally, you can open a web browser at [http://localhost:4911](http://localhost:4911) to see the live webcam feed. You can keep an eye on the logs to see data being sent to the database.\n\n## Resources\n\n- https://docs.edgeimpulse.com/docs/raspberry-pi-4\n- https://docs.edgeimpulse.com/docs/tutorials/end-to-end-tutorials/object-detection/object-detection\n- https://supabase.com/docs/guides/database/overview\n- https://supabase.com/docs/guides/realtime\n- https://supabase.com/docs/guides/getting-started/quickstarts/nextjs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdaaamn%2Fcoffee-cup-detect-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbogdaaamn%2Fcoffee-cup-detect-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdaaamn%2Fcoffee-cup-detect-runner/lists"}