提交 30912eb6 编写于 作者: D dongshuilong 提交者: Tingquan Gao

fix en doc bugs for mainbody_detection_en vector_search_en classification_en recognition_en

上级 f23d4368
......@@ -91,7 +91,7 @@ In the mainbody detection task, we use `ResNet50vd-DCN` as our backbone for bett
<a name="3"></a>
## 3 Model Training
## 3. Model Training
This section mainly talks about how to train your own mainbody detection model using PaddleDetection on your own datasets.
......
# Vector Search
Vector search finds wide applications in image recognition and image retrieval. It aims to obtain the similarity ranking for a given query vector by performing a similarity or distance calculation of feature vectors with all the vectors to be queried in an established vector library. In the image recognition system, [Faiss](https://github.com/facebookresearch/faiss) is adopted for corresponding support, please check [the official website of Faiss](https://github.com/facebookresearch/faiss for more information ) for more details. The main advantages of `Faiss` can be generalized as the following:
Vector search finds wide applications in image recognition and image retrieval. It aims to obtain the similarity ranking for a given query vector by performing a similarity or distance calculation of feature vectors with all the vectors to be queried in an established vector library. In the image recognition system, [Faiss](https://github.com/facebookresearch/faiss) is adopted for corresponding support, please check [the official website of Faiss](https://github.com/facebookresearch/faiss) for more details. The main advantages of `Faiss` can be generalized as the following:
- Great adaptability: support Windows, Linux, and MacOS systems
- Easy installation: support `python` interface and direct installation with `pip`
......
......@@ -10,7 +10,7 @@ Image Classification is a very basic but important field in the subject of compu
See [here](../algorithm_introduction/image_classification_en.md) for the detailed introduction of image classification algorithms.
## Contents
## Catalogue
- [1. Dataset Introduction](#1)
- [1.1 ImageNet-1k](#1.1)
......
......@@ -12,7 +12,7 @@ For an image to be queried, the image recognition process in PaddleClas is divid
The feature gallery is built in advance using the labeled image datasets. The complete image recognition system is shown in the figure below.
[![img](../../images/structure.jpg)
![img](../../images/structure.jpg)
To experience the whole image recognition system, or learn how to build a feature gallery, please refer to [Quick Start of Image Recognition](../quick_start/quick_start_recognition_en.md), which explains the overall application process. The following parts expound on the training part of the above three steps.
......@@ -311,7 +311,7 @@ Image retrieval refers to a query image given a specific instance (e.g. a specif
- Metric Learning
Metric learning studies how to learn a distance function on a particular task so that the distance function can help nearest-neighbour based algorithms (kNN, k-means, etc.) to achieve better performance. Deep Metric Learning is a method of metric learning that aims to learn a mapping from the original features to a low-dimensional dense vector space (embedding space) such that similar objects on the embedding space are closer together using commonly used distance functions (Euclidean distance, cosine distance, etc.) ) on the embedding space, while the distances between objects of different classes are not close to each other. Deep metric learning has achieved very successful applications in the field of computer vision, such as face recognition, commodity recognition, image retrieval, pedestrian re-identification, etc. See [HERE](../algorithm_introduction/metric_learning_em.md) for detailed information.
Metric learning studies how to learn a distance function on a particular task so that the distance function can help nearest-neighbour based algorithms (kNN, k-means, etc.) to achieve better performance. Deep Metric Learning is a method of metric learning that aims to learn a mapping from the original features to a low-dimensional dense vector space (embedding space) such that similar objects on the embedding space are closer together using commonly used distance functions (Euclidean distance, cosine distance, etc.) ) on the embedding space, while the distances between objects of different classes are not close to each other. Deep metric learning has achieved very successful applications in the field of computer vision, such as face recognition, commodity recognition, image retrieval, pedestrian re-identification, etc. See [HERE](../algorithm_introduction/metric_learning_en.md) for detailed information.
<a name="Introduction to Image Retrieval Datasets"></a>
......
# PP-ShiTu迁移应用及调优
## 目录
- [1.使用官方模型](#1)
- [1.1 下载官方模型及数据准备](#1.1)
- [1.2 建立检索库(gallery)](#1.2)
- [1.3 精度测试](1.3)
- [2.模型调优](#2)
- [2.1 检测模型调优](#2.1)
- [2.2 识别模型调优](#2.2)
- [3.模型加速](#3)
[PP-ShiTu快速开始](../quick_start/quick_start_recognition.md)中,主要展示了`PP-ShiTu`的快速开始demo。那么本文档主要介绍,如何将`PP-ShiTu`应用到自己的需求中,及如何继续调优,优化识别效果。具体可以分成以下三种情况
- 直接使用官方模型
......@@ -8,7 +19,9 @@
以下分别对上面三种情况进行具体讲解。
## 1 使用官方模型
<a name="1"></a>
## 1. 使用官方模型
对于其他的应用,首先建议使用此种方法,因为PaddleClas官方模型,是经过大量数据训练得到的,具有强大泛化性能的轻量级通用模型。其速度较快、精度较高,在Intel cpu上直接部署,也能快速得到结果。同时,直接使用官方模型,则无需训练新的模型,节约时间,方便快速部署。
......@@ -18,6 +31,8 @@
- 检索库更新
- 精度测试
<a name="1.1"></a>
### 1.1 下载官方模型及数据准备
模型下载及pipline 运行详见[图像识别快速开始](../quick_start/quick_start_recognition.md)
......@@ -28,7 +43,7 @@
建议一个类别一共准备30张图左右,其中约至少5张图作为建库图像,剩下的作为测试图像。
<a name="1.2 检索库更新"></a>
<a name="1.2"></a>
### 1.2 建立检索库(gallery)
......@@ -36,20 +51,28 @@
收集好图像后,数据整理及建库流程详见[图像识别快速开始](../quick_start/quick_start_recognition.md)`3.2 建立新的索引库`
<a name="1.3"></a>
### 1.3 精度测试
使用测试图像,对整个pipline进行简单的精度测试。如发现类别不正确,则需对gallery进行调整,将不正确的测试图像的相似图片(标注并裁剪出没有背景的物体)加入gallery中,反复迭代。经过调整后,可以测试出整个pipeline的精度。如果精度能够满足需求,则可继续使用。若精度不达预期,则需对模型进行调优,参考下面文档。
## 2 模型调优
<a name="2"></a>
## 2. 模型调优
在使用官方模型之后,如果发现精度不达预期,则可对模型进行训练调优。同时,根据官方模型的结果,需要进一步大概判断出 检测模型精度、还是识别模型精度问题。不同模型的调优,可参考以下文档。
<a name="2.1"></a>
### 2.1 检测模型调优
`PP-ShiTu`中检测模型采用的 `PicoDet `算法,具体算法请参考[此文档](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.3/configs/picodet)。检测模型的训练及调优,请参考[此文档](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.3/README_cn.md)
对模型进行训练的话,需要自行准备数据,并对数据进行标注,建议一个类别至少准备200张标注图像,并将标注图像及groudtruth文件转成coco文件格式,以方便使用PaddleDetection进行训练。主体检测的预训练权重及相关配置文件相见[主体检测文档](https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/picodet/application/mainbody_detection)。训练的时候,请加载主体检测的预训练权重。
<a name="2.2"></a>
### 2.2 识别模型调优
在使用官方模型后,如果不满足精度需求,则可以参考此部分文档,进行模型调优
......@@ -64,23 +87,11 @@
模型训练完成后,参照[1.2 检索库更新](#1.2 检索库更新)进行检索库更新。同时,对整个pipeline进行测试,如果精度不达预期,则重复此步骤。
## 3 模型加速
<a name="3"></a>
## 3. 模型加速
模型加速主要以下几种方法:
- 替换小模型:一般来说,越小的模型预测速度相对越快
- 模型裁剪、量化:请参考文档[模型压缩](./model_prune_quantization.md),压缩配置文件修改请参考[slim相关配置文件](../../../ppcls/configs/slim/)
# 会议纪要
1、排期表,每两周,大家主动更新。下两周计划及之前计划完成情况。@all
2、直播课一节,1月19号。@水龙
3、明年定4篇paper@all
4、复现论文踩过坑要记录好@崔程
5、paddle宣传稿,最好尽快写@all
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册