Merge branch 'main' of https://arnweb.nl/gitea/arne/EV5_Beeldherk_Bomen
This commit is contained in:
commit
aed4d22199
28
README.md
28
README.md
@ -67,6 +67,8 @@ $ pip install -e .
|
|||||||
```bash
|
```bash
|
||||||
$ python ./src/experiments/dataset.py
|
$ python ./src/experiments/dataset.py
|
||||||
```
|
```
|
||||||
|
4. (optional) run the template extraction tool
|
||||||
|
5. (optional) run the dataset splitter tool
|
||||||
|
|
||||||
### Run CVSuite (for the first time)
|
### Run CVSuite (for the first time)
|
||||||
1. Create `config.json` in the `./src/config/` folder and copy the contents of the template
|
1. Create `config.json` in the `./src/config/` folder and copy the contents of the template
|
||||||
@ -103,11 +105,35 @@ $ python ./src/helpers/test/knn.py -i ./out/result-(date/time).csv -o ./out/mode
|
|||||||
- `-m` Model to train; `dectree`, `randforest` or `extratree`
|
- `-m` Model to train; `dectree`, `randforest` or `extratree`
|
||||||
- `-s` Scaler file to use (`.pkl` file)
|
- `-s` Scaler file to use (`.pkl` file)
|
||||||
```sh
|
```sh
|
||||||
python ./src/helpers/test/decision_tree.py -i ./out/result-(date/time).csv -o ./out/models/ -m 'dectree' -s ./out/models/scale_(date/time).pkl
|
$ python ./src/helpers/test/decision_tree.py -i ./out/result-(date/time).csv -o ./out/models/ -m 'dectree' -s ./out/models/scale_(date/time).pkl
|
||||||
```
|
```
|
||||||
2. The script generates one `.pkl` file based on the chosen model
|
2. The script generates one `.pkl` file based on the chosen model
|
||||||
3. Edit your `config.json` to include the newly created model
|
3. Edit your `config.json` to include the newly created model
|
||||||
|
|
||||||
|
### Template extraction
|
||||||
|
> :warning: **Please note:** <br>
|
||||||
|
> This tool uses the legacy format for datasets.<br>
|
||||||
|
> Images are sorted using folders, instead of by name.
|
||||||
|
|
||||||
|
1. Images should have four standard Aruco markers clearly visible
|
||||||
|
2. Run the template extraction tool with an input directory as argument
|
||||||
|
```sh
|
||||||
|
$ python ./src/experiments/template_extraction/script.py ./dataset
|
||||||
|
```
|
||||||
|
3. The script generates new folders, ending with `_out`
|
||||||
|
4. The paths to any failed images are saved in `skipped.txt`
|
||||||
|
|
||||||
|
### Dataset splitting
|
||||||
|
1. Ensure that the dataset is in `./res/dataset`
|
||||||
|
2. Run the dataset splitter tool:
|
||||||
|
```sh
|
||||||
|
$ python ./src/experiments/dataset.py
|
||||||
|
```
|
||||||
|
3. Three new folders will be created, containing the following percentage of images:
|
||||||
|
- `./res/dataset/training`, 70%
|
||||||
|
- `./res/dataset/validation`, 20%
|
||||||
|
- `./res/dataset/training`, 10%
|
||||||
|
4. Images are split pseudorandomly, thus will create the same datasets on different machines.
|
||||||
---
|
---
|
||||||
|
|
||||||
Arne van Iterson<br>
|
Arne van Iterson<br>
|
||||||
|
Loading…
Reference in New Issue
Block a user