This is an application that displays data saved from an object detection model using Edge Impulse on Raspberry Pi. The project is described in more detail at coffee-cup-detect-runner. The data is retrieved from Supabase.
To get data to the database, you need a Supabase project. It should be already configured following the coffee-cup-detect-runner project. If you didn't do so, check out the project, or follow the following instructions.
You can head over to database.new to create a new Supabase project. When your project is up and running, navigate to the project's SQL Editor and paste in the following snippet:
create table detections (
id uuid NOT NULL DEFAULT uuid_generate_v4(),
created_at timestamp with time zone not null default current_timestamp,
message text
);
This will create a detections
table in which you can insert rows every time, for example, a coffee cup is detected.
Alternatively, you can manually navigate to your project's Table Editor and configure the table manually.
Create an .env
file (see .env.example
) and copy the Supabase credentials, more details here
SUPABASE_URL=<SUPABASE_URL>
SUPABASE_ANON_KEY=<SUPABASE_ANON_KEY>
Then, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources:
- https://nextjs.org/docs - learn about Next.js features and API.
- https://nextjs.org/learn - an interactive Next.js tutorial.
To learn about the entire project, go to coffee-cup-detect-runner. To learn about Edge Impulse follow these resources:
- https://docs.edgeimpulse.com/docs/raspberry-pi-4
- https://docs.edgeimpulse.com/docs/tutorials/end-to-end-tutorials/object-detection/object-detection
To learn about Supabase, take a look at the following resources: