An app creating Roboflow dataset using detections from an OAK-1 camera.
Live preview shows MobileNet SSD detections. After pressing enter
the app grabs frames and uploads them to Roboflow dataset along with annotations.
oak_roboflow_demo_short.mp4
-
If it's your first project with OAK, follow this first steps guide.
-
Clone repository. Install requirements. Download model.
git clone https://github.com/tomek-l/oak-roboflow-integration.git
cd oak-roboflow-integration
pip3 install -r requirements.txt --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
cd models/
bash download.sh
cd ..
- Setup Roboflow account
- Get API key (app.roboflow.com ->
settings
->workspaces
->Roboflow API
-> Copy private API key) - Create new (empty) project at app.roboflow.com. Then copy the project's (a.k.a. dataset's) name.
- Run the code with your
API key
anddataset name
:
python3 main.py --dataset oak-dataset --api_key vkIkZac3CXvp0RZ31B3f
- Press
enter
to capture and upload frames with annotations. - Press
q
to exit
- Experiment with optional cmd arguments for auto-uploading
--autoupload_threshold
and--autoupload_interval
. For example, to automatically upload annotations with confidence above0.6
every0.5
do:
python3 main.py --dataset oak-dataset --api_key vkIkZac3CXvp0RZ31B3f --autoupload_threshold 0.6 --autoupload_interval 0.5
- Experiment with
--upload_res
parameter. It allows for uploading annotated images in custom reosolution, which can be useful to create dataset with high-resolution images. For example, to upload in2028x1520
do:
python3 main.py --dataset oak-dataset --api_key vkIkZac3CXvp0RZ31B3f --autoupload_threshold 0.6 --autoupload_interval 0.5 --upload_res 2028x1520