Aidan is detecting any needs.
Aidan is a tool for detecting image classifications captured by Nest Cam.
A typical usage is to detect baby needs, such as diaper change, feeding, or sleeping. It can act as a smart baby monitor. See this blog for details: How I built a smart baby monitor using (misusing) Google Cloud with almost no cost.
If you are new to Device Access, please read the Get Started Guide.
After creating a project on Firebase, use the steps below to deploy the sample app.
Clone the app:
git clone https://github.com/hemslo/aidan.git
Navigate into project directory:
cd aidan
Link the app with your Firebase project:
firebase use --add [PROJECT-ID]
Update firebaseConfig.ts with your Firebase project configuration. Guide.
Deploy the app to your Firebase project:
firebase deploy
You can then access the app at your Hosting URL (https://[PROJECT-ID].web.app).
- Enable Authentication (Email/Password & Google) in your Firebase project. Doc.
- Download the service account key for your Firebase project to
admin/serviceAccountKey.json
. Doc - Use npm scripts to add users and set claims
cd admin npm install npm run addUser EMAIL PASSWORD npm run setClaims EMAIL '{"read": "true", "write": "true"}'
- Use new account to login
- Link your Nest Camera to your Firebase project by providing GCP Client Id, Secret and Device Access Project Id.
- Take some snapshots (There is a toggle to enable taking snapshots every 30 seconds)
- Go to Dashboard (
/dashboard
) to see the results - Add some labels
- Start annotating the snapshots
- Export image gcs uris and labels to a csv file in BigQuery
- Create dataset in Google Cloud AutoML Vision
- Train an edge model
- Export model as TensorFlow.js
- Upload model to Firebase Storage
models/latest
- Check if new snapshots can be classified automatically
If you want to take snapshots from server, you can use aidan-feeder. It's using puppeteer to take snapshots in a headless Chrome.
- copy
feeder/.env.sample
tofeeder/.env
- set environment variables according to your config
- use docker image from ghcr
- run container with .env file
docker run -d --name aidan-feeder --env-file .env ghcr.io/hemslo/aidan-feeder
+---------------+ +-----------+
| Cloud Storage | - | Cloud Run |
+---------------+ +-----------+
| |
+----------+ +------------------+ +-----------+ +----------+ +---------------+
| Nest Cam | - | Firebase Hosting | - | Firestore | - | BigQuery | - | AutoML Vision |
+----------+ +------------------+ +-----------+ +----------+ +---------------+
|
+-----------+
| Puppeteer |
+-----------+