This repository contains a demo using FOMO-AD (Edge Impulse's visual anomaly detection model) to find interesting parts of an image, then cascade to GPT4-o to do further analysis.
You'll need a trained visual anomaly detection model in Edge Impulse. See the docs. Afterwards, download your model in .eim format, including hardware optimization via:
$ edge-impulse-linux-runner --clean --download path-to-your-model.eim
(Alternatively, go to Deployment in your Edge Impulse project, find the 'Linux' deployment for your architecture (e.g. 'Linux (AARCH64)'), and build from there).
-
Install dependencies:
npm install
-
Set your OpenAI API Key:
export OPENAI_API_KEY=sk-MA...
-
Run the application:
npm run build && node build/classify-camera-webserver.js ./path-to-your-model.eim
If you have multiple cameras a message will be printed, and you should add the camera name as the last argument to the script above.
-
Go to http://localhost:4912/ and see the cascade working.