Skip to content

Commit

Permalink
Update reame
Browse files Browse the repository at this point in the history
  • Loading branch information
denniswittich committed Dec 5, 2024
1 parent abfa564 commit 571d138
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ The detector also has a sio **upload endpoint** that can be used to upload image

The endpoint returns None if the upload was successful and an error message otherwise.

### Changing the model version
### Changing the model versioning mode

The detector can be configured to one of the following behaviors:

- download use a specific model version
- use a specific model version
- automatically update the model version according to the learning loop deployment target
- pause the model updates and use the version that was last loaded

Expand All @@ -84,6 +84,15 @@ The model versioning configuration can be accessed/changed via a REST endpoint.
Note that the configuration is not persistent, however, the default behavior on startup can be configured via the environment variable `VERSION_CONTROL_DEFAULT`.
If the environment variable is set to `VERSION_CONTROL_DEFAULT=PAUSE`, the detector will pause the model updates on startup. Otherwise, the detector will automatically follow the loop deployment target.

The model versioning configuration can also be changed via a socketio event:

- Configure the detector to use a specific model version: `sio.emit('set_model_version_mode', '1.0')`
- Configure the detector to automatically update the model version: `sio.emit('set_model_version_mode', 'follow_loop')`
- Pause the model updates: `sio.emit('set_model_version_mode', 'pause')`

There is also a GET endpoint to fetch the current model versioning configuration:
`sio.emit('get_model_version')` or `curl http://localhost/model_version`

### Changing the outbox mode

If the autoupload is set to `all` or `filtered` (selected) images and the corresponding detections are saved on HDD (the outbox). A background thread will upload the images and detections to the Learning Loop. The outbox is located in the `outbox` folder in the root directory of the node. The outbox can be cleared by deleting the files in the folder.
Expand All @@ -98,6 +107,16 @@ Example Usage:
The current state can be queried via a GET request:
`curl http://localhost/outbox_mode`

Alternatively, the outbox mode can be changed via a socketio event:

- Enable upload: `sio.emit('set_outbox_mode', 'continuous_upload')`
- Disable upload: `sio.emit('set_outbox_mode', 'stopped')`

The outbox mode can also be queried via:

- HTTP: `curl http://localhost/outbox_mode`
- SocketIO: `sio.emit('get_outbox_mode')`

### Explicit upload

The detector has a REST endpoint to upload images (and detections) to the Learning Loop. The endpoint takes a POST request with the image and optionally the detections. The image is expected to be in jpg format. The detections are expected to be a json dictionary. Example:
Expand Down

0 comments on commit 571d138

Please sign in to comment.