Skip to content

Commit 023ec34

Browse files
authored
Merge pull request #1686 from Sibo2rr/dev/en
readthedoc in english
2 parents 64abc64 + 0c93277 commit 023ec34

39 files changed

+269
-462
lines changed

docs/en/advanced_tutorials/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
advanced_tutorials
2+
================================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
DataAugmentation_en.md
8+
distillation/index
9+
multilabel/index
10+
model_prune_quantization_en.md
11+
code_overview_en.md
12+
how_to_contribute_en.md

docs/en/advanced_tutorials/multilabel/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Multilabel Classification
44
.. toctree::
55
:maxdepth: 3
66

7-
multilabel.md
7+
multilabel_en.md

docs/en/algorithm_introduction/DataAugmentation_en.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
Data augmentation is a commonly used regularization method in image classification task, which is often used in scenarios with insufficient data or large model. In this chapter, we mainly introduce 8 image augmentation methods besides standard augmentation methods. Users can apply these methods in their own tasks for better model performance. Under the same conditions, these augmentation methods' performance on ImageNet1k dataset is shown as follows.
2525

26-
![](../../../images/image_aug/main_image_aug.png)
26+
![](../../images/image_aug/main_image_aug.png)
2727

2828

2929
<a name="2"></a>
@@ -50,7 +50,7 @@ Compared with the above standard image augmentation methods, the researchers hav
5050

5151
Visualization results of some images after augmentation are shown as follows.
5252

53-
![](../../../images/image_aug/image_aug_samples_s_en.jpg)
53+
![](../../images/image_aug/image_aug_samples_s_en.jpg)
5454

5555

5656
The following table shows more detailed information of the transformations.
@@ -72,7 +72,7 @@ The following table shows more detailed information of the transformations.
7272

7373
PaddleClas integrates all the above data augmentation strategies. More details including principles and usage of the strategies are introduced in the following chapters. For better visualization, we use the following figure to show the changes after the transformations. And `RandCrop` is replaced with` Resize` for simplification.
7474

75-
![](../../../images/image_aug/test_baseline.jpeg)
75+
![](../../images/image_aug/test_baseline.jpeg)
7676

7777
<a name="2.1"></a>
7878
### 2.1 Image Transformation
@@ -91,7 +91,7 @@ Unlike conventional artificially designed image augmentation methods, AutoAugmen
9191

9292
The images after `AutoAugment` are as follows.
9393

94-
![][test_autoaugment]
94+
![](../../images/image_aug/test_autoaugment.jpeg)
9595

9696
<a name="2.1.2"></a>
9797
#### 2.1.2 RandAugment
@@ -107,7 +107,7 @@ In `RandAugment`, the author proposes a random augmentation method. Instead of u
107107

108108
The images after `RandAugment` are as follows.
109109

110-
![][test_randaugment]
110+
![](../../images/image_aug/test_randaugment.jpeg)
111111

112112
<a name="2.1.3"></a>
113113
#### 2.1.3 TimmAutoAugment
@@ -137,7 +137,7 @@ Cutout is a kind of dropout, but occludes input image rather than feature map. I
137137

138138
The images after `Cutout` are as follows.
139139

140-
![][test_cutout]
140+
![](../../images/image_aug/test_cutout.jpeg)
141141

142142
<a name="2.2.2"></a>
143143
#### 2.2.2 RandomErasing
@@ -150,7 +150,7 @@ RandomErasing is similar to the Cutout. It is also to solve the problem of poor
150150

151151
The images after `RandomErasing` are as follows.
152152

153-
![][test_randomerassing]
153+
![](../../images/image_aug/test_randomerassing.jpeg)
154154

155155
<a name="2.2.3"></a>
156156
#### 2.2.3 HideAndSeek
@@ -162,11 +162,11 @@ Github repo: [https://github.com/kkanshul/Hide-and-Seek](https://github.com/kkan
162162

163163
Images are divided into some patches for `HideAndSeek` and masks are generated with certain probability for each patch. The meaning of the masks in different areas is shown in the figure below.
164164

165-
![][hide_and_seek_mask_expanation]
165+
![](../../images/image_aug/hide-and-seek-visual.png)
166166

167167
The images after `HideAndSeek` are as follows.
168168

169-
![][test_hideandseek]
169+
![](../../images/image_aug/gridmask-0.png)
170170

171171
<a name="2.2.4"></a>
172172
#### 2.2.4 GridMask
@@ -180,7 +180,7 @@ The author points out that the previous method based on image cropping has two p
180180
1. Excessive deletion of the area may cause most or all of the target subject to be deleted, or cause the context information loss, resulting in the images after enhancement becoming noisy data.
181181
2. Reserving too much area has little effect on the object and context.
182182

183-
![][gridmask-0]
183+
![](../../images/image_aug/hide-and-seek-visual.png)
184184

185185
Therefore, it is the core problem to be solved how to
186186
if you avoid over-deletion or over-retention becomes the core problem to be solved.
@@ -195,7 +195,7 @@ It shows that the second method is better.
195195

196196
The images after `GridMask` are as follows.
197197

198-
![][test_gridmask]
198+
![](../../images/image_aug/test_gridmask.jpeg)
199199

200200
<a name="2.3"></a>
201201
### 2.3 Image mix
@@ -215,7 +215,7 @@ Mixup is the first solution for image aliasing, it is easy to realize and perfor
215215

216216
The images after `Mixup` are as follows.
217217

218-
![][test_mixup]
218+
![](../../images/image_aug/test_mixup.png)
219219

220220
<a name="2.3.2"></a>
221221
#### 2.3.2 Cutmix
@@ -229,7 +229,7 @@ Cutmix randomly cuts out an `ROI` from one image, and then covered onto the corr
229229

230230
The images after `Cutmix` are as follows.
231231

232-
![][test_cutmix]
232+
![](../../images/image_aug/test_cutmix.png)
233233

234234
For the practical part of data augmentation, please refer to [Data Augmentation Practice](../advanced_tutorials/DataAugmentation_en.md).
235235

docs/en/algorithm_introduction/ImageNet_models_en.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,15 @@ Based on the ImageNet-1k classification dataset, the 37 classification network s
4242

4343
Curves of accuracy to the inference time of common server-side models are shown as follows.
4444

45-
<div align="center">
46-
<img src="../../images/models/V100_benchmark/v100.fp32.bs1.main_fps_top1_s.png" width="800">
47-
</div>
45+
![](../../images/models/V100_benchmark/v100.fp32.bs1.main_fps_top1_s.png)
4846

4947
Curves of accuracy to the inference time of common mobile-side models are shown as follows.
5048

51-
<div align="center">
52-
<img src="../../images/models/mobile_arm_top1.png" width="800">
53-
</div>
49+
![](../../images/models/mobile_arm_top1.png)
5450

5551
Curves of accuracy to the inference time of some VisionTransformer models are shown as follows.
5652

57-
<div align="center">
58-
<img src="../../images/models/V100_benchmark/v100.fp32.bs1.visiontransformer.png" width="800">
59-
</div>
53+
![](../../images/models/V100_benchmark/v100.fp32.bs1.visiontransformer.png)
6054

6155
<a name="2"></a>
6256

docs/en/algorithm_introduction/image_classification_en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Image Classification Task Introduction
12
## Catalogue
23

34
- [1. Dataset Introduction](#1)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
algorithm_introduction
2+
================================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
image_classification_en.md
8+
metric_learning_en.md
9+
knowledge_distillation_en.md
10+
model_prune_quantization_en.md
11+
ImageNet_models_en.md
12+
DataAugmentation_en.md

docs/en/conf.py

Lines changed: 28 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,70 +10,56 @@
1010
# add these directories to sys.path here. If the directory is relative to the
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
13-
import os
14-
import recommonmark
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
import sphinx_rtd_theme
17+
from recommonmark.parser import CommonMarkParser
18+
# -- Project information -----------------------------------------------------
1519

16-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
20+
project = 'PaddleClas-en'
21+
copyright = '2022, PaddleClas'
22+
author = 'PaddleClas'
1723

18-
# -- Project information -----------------------------------------------------
24+
# The full version, including alpha/beta/rc tags
25+
release = '2.3'
1926

20-
project = 'PaddleClas'
21-
copyright = '2020, paddlepaddle'
22-
author = 'paddlepaddle'
2327

2428
# -- General configuration ---------------------------------------------------
2529

2630
# Add any Sphinx extension module names here, as strings. They can be
2731
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2832
# ones.
29-
33+
source_parsers = {
34+
'.md': CommonMarkParser,
35+
}
36+
source_suffix = ['.rst', '.md']
3037
extensions = [
31-
'sphinx.ext.autodoc',
32-
'sphinx.ext.napoleon',
33-
'sphinx.ext.coverage',
34-
'sphinx.ext.viewcode',
35-
'sphinx.ext.mathjax',
36-
'sphinx.ext.githubpages',
37-
'sphinx.ext.napoleon',
38-
'recommonmark',
39-
'sphinx_markdown_tables',
40-
]
41-
38+
'recommonmark',
39+
'sphinx_markdown_tables'
40+
]
4241
# Add any paths that contain templates here, relative to this directory.
4342
templates_path = ['_templates']
4443

45-
# md file can also be parased
46-
source_suffix = ['.rst', '.md']
44+
# The root document.
45+
root_doc = 'doc_en'
4746

48-
# The master toctree document.
49-
master_doc = 'index'
47+
# List of patterns, relative to source directory, that match files and
48+
# directories to ignore when looking for source files.
49+
# This pattern also affects html_static_path and html_extra_path.
50+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
5051

51-
# The language for content autogenerated by Sphinx. Refer to documentation
52-
# for a list of supported languages.
53-
#
54-
# This is also used if you do content translation via gettext catalogs.
55-
# Usually you set "language" from the command line for these cases.
56-
language = 'en'
5752

5853
# -- Options for HTML output -------------------------------------------------
5954

6055
# The theme to use for HTML and HTML Help pages. See the documentation for
6156
# a list of builtin themes.
62-
63-
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
64-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
65-
66-
if not on_rtd: # only import and set the theme if we're building docs locally
67-
import sphinx_rtd_theme
68-
html_theme = 'sphinx_rtd_theme'
69-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
70-
71-
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
57+
#
58+
# 更改文档配色
59+
html_theme = "sphinx_rtd_theme"
60+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
7261

7362
# Add any paths that contain custom static files (such as style sheets) here,
7463
# relative to this directory. They are copied after the builtin static files,
7564
# so a file named "default.css" will overwrite the builtin "default.css".
76-
7765
html_static_path = ['_static']
78-
79-
html_logo = '../images/logo.png'

docs/en/data_preparation/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
data_preparation
2+
================================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
recognition_dataset_en.md
8+
classification_dataset_en.md

docs/en/doc_en.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Welcome to PaddleClas!
2+
================================
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
introduction/index
8+
installation/index
9+
quick_start/index
10+
image_recognition_pipeline/index
11+
data_preparation/index
12+
models_training/index
13+
inference_deployment/index
14+
models/index
15+
algorithm_introduction/index
16+
advanced_tutorials/index
17+
others/index
18+
faq_series/index
19+
20+
21+
22+
23+

docs/en/extension/VisualDL_en.md

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

docs/en/extension/index.rst

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

docs/en/extension/multi_machine_training_en.md

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

docs/en/extension/paddle_hub_en.md

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

0 commit comments

Comments
 (0)