Skip to content

Commit bf0838d

Browse files
authored
docs: add tutorials of fine-tune on a custom dataset (#711)
1 parent c4b6947 commit bf0838d

File tree

13 files changed

+1272
-171
lines changed

13 files changed

+1272
-171
lines changed

benchmark_results.md

Lines changed: 51 additions & 49 deletions
Large diffs are not rendered by default.

docs/en/how_to_guides/finetune_with_a_custom_dataset.md

Lines changed: 359 additions & 0 deletions
Large diffs are not rendered by default.

docs/zh/how_to_guides/finetune_with_a_custom_dataset.md

Lines changed: 365 additions & 0 deletions
Large diffs are not rendered by default.

examples/README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
This folder contains examples for various tasks, which users can run easily.
22

3-
### Finetune
4-
```
5-
python examples/finetune.py
6-
7-
```
8-
This example shows how to finetune a pretrained model on your own dataset. You can also specifiy `--freeze_backbone` to choose whether to freeze the backbone and finetune the classifier head only.
9-
10-
113
### Single process with model training and evaluation
124
```
135
python examples/train_with_func_example.py

examples/finetune.py

Lines changed: 0 additions & 108 deletions
This file was deleted.

examples/finetune/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
This folder contains scripts for fine-tuning on your own custom dataset, do refer to [tutorials](https://mindspore-lab.github.io/mindcv/how_to_guides/finetune_with_a_custom_dataset/) for details.
2+
3+
### split_files.py
4+
```shell
5+
python examples/finetune/split_files.py
6+
```
7+
This file taking Aircraft dataset as an example, shows how to manually reorganize data into a tree-structure directory according to an annotation file. Note that it's only for Aircraft dataset but not a general one, you'd better check the content before running it.
8+
9+
### read_images_online.py
10+
11+
This is an example demonstrating how to read the raw images as well as the labels into a `GeneratorDataset` object, which is a `MappableDataset` class that can be read directly by models. You are recommended to insert this part into your data preprocessing script or training script, but not run it alone.
12+
13+
### finetune.py
14+
```shell
15+
python examples/finetune/finetune.py --config=./configs/mobilenetv3/mobilnet_v3_small_ascend.yaml
16+
```
17+
A script for fine-tuning with some example code of fine-tuning methods in it (refer to the tutorial mentioned above).

0 commit comments

Comments
 (0)