Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
docs: Update train_model.md to include instructions for training and …
Browse files Browse the repository at this point in the history
…using custom detection models
  • Loading branch information
royshil committed May 13, 2024
1 parent 99f607f commit f4f7dab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Roadmap features:
- Make available detection information for other plugins through settings
- More real-time models choices

## Train a custom model
## Train and use a custom detection model

Follow the instructions in [docs/train_model.md](docs/train_model.md) to train your own custom model.
Follow the instructions in [docs/train_model.md](docs/train_model.md) to train and use your own custom model.

## Building

Expand Down
Binary file added docs/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions docs/train_model.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# How to train your custom model for OBS Detect plugin
# How to train and use a custom model with OBS Detect plugin

OBS Detect is based on the [EdgeYOLO](https://github.com/LSH9832/edgeyolo) work.
They provide a model training script that works with just setting some parameters.

If you already have a trained EdgeYOLO model in `.onnx` format, skip to the [last step](#step-6-use-the-model-with-obs-detect).

You need to get a dataset first. The supported dataset formats are mentiond in the [EdgeYOLO](https://github.com/LSH9832/edgeyolo?tab=readme-ov-file#train) readme: COCO, VOC, YOLO, and DOTA.

In this example we will use a COCO dataset from Roboflow. You can get the dataset from [here](https://public.roboflow.com/object-detection/aquarium/2).
Expand Down Expand Up @@ -181,6 +183,6 @@ You will find the ONNX model in the `output/export/` folder, e.g. `output/export

You can now use the ONNX model with the OBS Detect plugin. Just load the model from the plugin settings.

![alt text](image.png)
![select external model](image.png)

You will also need a configuration file for the model but that is created automatically by the export script above. It will have the same name as the ONNX model but with a `.json` extension.
You will also need a configuration file for the model with the class names, which is created automatically by the export / conversion script above. It will have the same name as the ONNX model but with a `.json` extension.

0 comments on commit f4f7dab

Please sign in to comment.