mirror of
https://github.com/PaddlePaddle/PaddleClas.git
synced 2025-06-03 21:55:06 +08:00
Update cartoon_character.md
This commit is contained in:
parent
53b34e880b
commit
e74e4bd635
@ -9,41 +9,3 @@
|
|||||||

|

|
||||||
|
|
||||||
论文地址:https://arxiv.org/pdf/1907.1339
|
论文地址:https://arxiv.org/pdf/1907.1339
|
||||||
|
|
||||||
## 推理
|
|
||||||
检索任务的推理过程主要分为两步: 1. 建库; 2. 检索。 通过配置文件,我们可以实现自动建库,并对配置文件里指定的图像进行检索,返回识别结果
|
|
||||||
|
|
||||||
**1. 获取数据**
|
|
||||||
```
|
|
||||||
cd dataset
|
|
||||||
wget http://10.9.189.15:8088/metric_learning_dygraph/0607/PaddleClas/dataset/icartoon.tar.gz
|
|
||||||
tar -xvf icartoon.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
**2. 获取模型**
|
|
||||||
|
|
||||||
**3. 修改配置**
|
|
||||||
|
|
||||||
**4. 前向推理**
|
|
||||||
```
|
|
||||||
python deploy/python/predict_system.py -c deploy/configs/inference_icartoon.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
## 训练
|
|
||||||
**单卡训练**
|
|
||||||
```
|
|
||||||
Python tools/train.py -c ppcls/configs/Cartoon/ResNet50_icartoon.yaml
|
|
||||||
|
|
||||||
```
|
|
||||||
**多卡训练**
|
|
||||||
```
|
|
||||||
python -m paddle.distributed.launch \
|
|
||||||
--gpus="0,1,2,3" \
|
|
||||||
tools/train.py \
|
|
||||||
-c ./ppcls/configs/Cartoonface/ResNet50_icartoon.yaml
|
|
||||||
|
|
||||||
```
|
|
||||||
**评估**
|
|
||||||
```
|
|
||||||
Python tools/eval.py -c ppcls/configs/Cartoon/ResNet50_icartoon.yaml
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user