Skip to content

Latest commit

 

History

History
 
 

gen2-roboflow-integration

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

OAK + Roboflow Demo

An app creating Roboflow dataset using detections from an OAK-1 camera.

Demo

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

Getting Started

  1. If it's your first project with OAK, follow this first steps guide.

  2. 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 ..
  1. 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.
  1. Run the code with your API key and dataset name:
python3 main.py --dataset oak-dataset --api_key vkIkZac3CXvp0RZ31B3f
  • Press enter to capture and upload frames with annotations.
  • Press q to exit
  1. Experiment with optional cmd arguments for auto-uploading --autoupload_threshold and --autoupload_interval. For example, to automatically upload annotations with confidence above 0.6 every 0.5 do:
python3 main.py --dataset oak-dataset --api_key vkIkZac3CXvp0RZ31B3f --autoupload_threshold 0.6 --autoupload_interval 0.5
  1. 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 in 2028x1520 do:
python3 main.py --dataset oak-dataset --api_key vkIkZac3CXvp0RZ31B3f --autoupload_threshold 0.6 --autoupload_interval 0.5 --upload_res 2028x1520