henry000 commited on
Commit
d477c67
Β·
1 Parent(s): 298fa34

πŸ“ [Refactor] the docs language from md to rst

Browse files
Files changed (41) hide show
  1. docs/0_get_start/0_quick_start.md +0 -1
  2. docs/0_get_start/0_quick_start.rst +69 -0
  3. docs/0_get_start/1_installations.md +0 -4
  4. docs/0_get_start/1_installations.rst +15 -0
  5. docs/0_get_start/2_git.md +0 -3
  6. docs/0_get_start/3_pypi.md +0 -3
  7. docs/0_get_start/4_docker.md +0 -3
  8. docs/0_get_start/5_conda.md +0 -3
  9. docs/1_tutorials/0_train.md +0 -5
  10. docs/1_tutorials/0_train.rst +10 -0
  11. docs/1_tutorials/1_validation.md +0 -5
  12. docs/1_tutorials/1_validation.rst +11 -0
  13. docs/1_tutorials/2_inference.rst +11 -0
  14. docs/2_model_zoo/0_object_detection.md +0 -5
  15. docs/2_model_zoo/0_object_detection.rst +8 -0
  16. docs/2_model_zoo/1_segmentation.md +0 -5
  17. docs/2_model_zoo/1_segmentation.rst +8 -0
  18. docs/2_model_zoo/2_classification.md +0 -5
  19. docs/2_model_zoo/2_classification.rst +4 -0
  20. docs/3_custom/0_model.md +0 -1
  21. docs/3_custom/0_model.rst +4 -0
  22. docs/3_custom/1_data_augment.md +0 -1
  23. docs/3_custom/1_data_augment.rst +4 -0
  24. docs/3_custom/2_loss.md +0 -1
  25. docs/3_custom/2_loss.rst +4 -0
  26. docs/3_custom/3_task.md +0 -1
  27. docs/3_custom/3_task.rst +4 -0
  28. docs/4_deploy/1_deploy.md +0 -3
  29. docs/4_deploy/1_deploy.rst +10 -0
  30. docs/4_deploy/2_onnx.md +0 -1
  31. docs/4_deploy/2_onnx.rst +4 -0
  32. docs/4_deploy/3_tensorrt.md +0 -1
  33. docs/4_deploy/3_tensorrt.rst +5 -0
  34. docs/5_features/0_small_object.rst +4 -0
  35. docs/5_features/1_version_convert.rst +4 -0
  36. docs/5_features/2_IPython.rst +4 -0
  37. docs/6_function_docs/0_solver.rst +4 -0
  38. docs/6_function_docs/1_tools.rst +4 -0
  39. docs/6_function_docs/2_module.rst +4 -0
  40. docs/conf.py +5 -0
  41. docs/index.rst +27 -22
docs/0_get_start/0_quick_start.md DELETED
@@ -1 +0,0 @@
1
- # Quick Start
 
 
docs/0_get_start/0_quick_start.rst ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quick Start
2
+ ===========
3
+
4
+ .. note::
5
+ We expect all customizations to be done primarily by passing arguments or modifying the YAML config files.
6
+ If more detailed modifications are needed, custom content should be modularized as much as possible to avoid extensive code modifications.
7
+
8
+ Install YOLO
9
+ ------------
10
+
11
+ Clone the repository and install the dependencies:
12
+
13
+ .. code-block:: bash
14
+
15
+ git clone https://github.com/WongKinYiu/YOLO.git
16
+ cd YOLO
17
+ pip install -r requirements-dev.txt
18
+ # Make sure to work inside the cloned folder.
19
+
20
+ Alternatively, If you are planning to make a simple change:
21
+
22
+ **Note**: In the following examples, you should replace ``python yolo/lazy.py`` with ``yolo`` .
23
+
24
+ .. code-block:: bash
25
+
26
+ pip install git+https://github.com/WongKinYiu/YOLO.git
27
+
28
+ **Note**: Most tasks already include at yolo/lazy.py, so you can run with this prefix and follow arguments: ``python yolo/lazy.py``
29
+
30
+
31
+ Train Model
32
+ -----------
33
+
34
+ To train the model, use the following command:
35
+
36
+ .. code-block:: bash
37
+
38
+ python yolo/lazy.py task=train
39
+
40
+ yolo task=train # if installed via pip
41
+
42
+ - Overriding the ``dataset`` parameter, you can customize your dataset via a dataset config.
43
+ - Overriding YOLO model by setting the ``model`` parameter to ``{v9-c, v9-m, ...}``.
44
+ - More details can be found at :ref:`Train Tutorials<Train>`.
45
+
46
+ For example:
47
+
48
+ .. code-block:: bash
49
+
50
+ python yolo/lazy.py task=train dataset=AYamlFilePath model=v9-m
51
+
52
+ yolo task=train dataset=AYamlFilePath model=v9-m # if installed via pip
53
+
54
+ Inference & Deployment
55
+ ------------------------
56
+
57
+ Inference is the default task of ``yolo/lazy.py``. To run inference and deploy the model, use:
58
+ More details can be found at :ref:`Inference Tutorials <Inference>`.
59
+
60
+ .. code-block:: bash
61
+
62
+ python yolo/lazy.py task.data.source=AnySource
63
+
64
+ yolo task.data.source=AnySource # if installed via pip
65
+
66
+ You can enable fast inference modes by adding the parameter ``task.fast_inference={onnx, trt, deploy}``.
67
+
68
+ - Theoretical acceleration following :ref:`YOLOv9 <Deploy>`.
69
+ - Hardware acceleration like :ref:`ONNX <ONNX>` and :ref:`TensorRT <TensorRT>`. for optimized deployment.
docs/0_get_start/1_installations.md DELETED
@@ -1,4 +0,0 @@
1
- # Install YOLO
2
-
3
- ## GPU (Cuda / MPS)
4
- ## CPU only
 
 
 
 
 
docs/0_get_start/1_installations.rst ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Install YOLO
2
+ ============
3
+
4
+ Git
5
+ ---
6
+
7
+ pypi(pip install)
8
+ -----------------
9
+
10
+ Docker
11
+ ------
12
+
13
+ Conda
14
+ -----
15
+ [WIP]
docs/0_get_start/2_git.md DELETED
@@ -1,3 +0,0 @@
1
- # Install via Git& GitHub
2
-
3
- ## [WIP]
 
 
 
 
docs/0_get_start/3_pypi.md DELETED
@@ -1,3 +0,0 @@
1
- # Install via PyPi(pip install)
2
-
3
- ## [WIP]
 
 
 
 
docs/0_get_start/4_docker.md DELETED
@@ -1,3 +0,0 @@
1
- # Install in Docker
2
-
3
- ## [WIP]
 
 
 
 
docs/0_get_start/5_conda.md DELETED
@@ -1,3 +0,0 @@
1
- # Install in Conda env
2
-
3
- ## [WIP]
 
 
 
 
docs/1_tutorials/0_train.md DELETED
@@ -1,5 +0,0 @@
1
- # Train
2
-
3
- ## Train on COCO2017
4
-
5
- ## Train on Cusom Dataset
 
 
 
 
 
 
docs/1_tutorials/0_train.rst ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _Train:
2
+
3
+ Train
4
+ =====
5
+
6
+ Train on COCO2017
7
+ -----------------
8
+
9
+ Train on Cusom Dataset
10
+ -----------------
docs/1_tutorials/1_validation.md DELETED
@@ -1,5 +0,0 @@
1
- # Validation
2
-
3
- ## Validation on COCO2017
4
-
5
- ## Validation on Custom Dataset
 
 
 
 
 
 
docs/1_tutorials/1_validation.rst ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _Validation:
2
+
3
+ Validation
4
+ ==========
5
+
6
+
7
+ Validation on COCO2017
8
+ ----------------------
9
+
10
+ Validation on Custom Dataset
11
+ ----------------------------
docs/1_tutorials/2_inference.rst ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _Inference:
2
+
3
+ Inference
4
+ ==========
5
+
6
+
7
+ Inference Video
8
+ ---------------
9
+
10
+ Inference Image
11
+ ---------------
docs/2_model_zoo/0_object_detection.md DELETED
@@ -1,5 +0,0 @@
1
- # Object Detection
2
-
3
- ## YOLOv7
4
-
5
- ## YOLOv9
 
 
 
 
 
 
docs/2_model_zoo/0_object_detection.rst ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ Object Detection
2
+ ================
3
+
4
+ YOLOv7
5
+ ------
6
+
7
+ YOLOv9
8
+ ------
docs/2_model_zoo/1_segmentation.md DELETED
@@ -1,5 +0,0 @@
1
- # Segmentations
2
-
3
- ## YOLOv7
4
-
5
- ## YOLOv9
 
 
 
 
 
 
docs/2_model_zoo/1_segmentation.rst ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ Segmentations
2
+ =============
3
+
4
+ YOLOv7
5
+ ------
6
+
7
+ YOLOv9
8
+ ------
docs/2_model_zoo/2_classification.md DELETED
@@ -1,5 +0,0 @@
1
- # Classification
2
-
3
- ## YOLOv7
4
-
5
- ## YOLOv9
 
 
 
 
 
 
docs/2_model_zoo/2_classification.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Classification
2
+ ==============
3
+
4
+ [WIP]
docs/3_custom/0_model.md DELETED
@@ -1 +0,0 @@
1
- # Model
 
 
docs/3_custom/0_model.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _Model:
2
+
3
+ Model
4
+ =====
docs/3_custom/1_data_augment.md DELETED
@@ -1 +0,0 @@
1
- # Data Augment
 
 
docs/3_custom/1_data_augment.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _DataAugment:
2
+
3
+ Data Augment
4
+ ============
docs/3_custom/2_loss.md DELETED
@@ -1 +0,0 @@
1
- # Loss
 
 
docs/3_custom/2_loss.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _Loss:
2
+
3
+ Loss
4
+ ====
docs/3_custom/3_task.md DELETED
@@ -1 +0,0 @@
1
- # Task
 
 
docs/3_custom/3_task.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _Task:
2
+
3
+ Task
4
+ ====
docs/4_deploy/1_deploy.md DELETED
@@ -1,3 +0,0 @@
1
- # Deploy YOLOv9
2
-
3
- # Deploy YOLOv7
 
 
 
 
docs/4_deploy/1_deploy.rst ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _Deploy:
2
+
3
+ Deploy Model
4
+ ============
5
+
6
+ Deploy YOLOv9
7
+ -------------
8
+
9
+ Deploy YOLOv7
10
+ -------------
docs/4_deploy/2_onnx.md DELETED
@@ -1 +0,0 @@
1
- # Compile to ONNX
 
 
docs/4_deploy/2_onnx.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _ONNX:
2
+
3
+ Compile to ONNX
4
+ ===============
docs/4_deploy/3_tensorrt.md DELETED
@@ -1 +0,0 @@
1
- # Compile to TensorRT
 
 
docs/4_deploy/3_tensorrt.rst ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ .. _TensorRT:
2
+
3
+
4
+ Compile to TensorRT
5
+ ===================
docs/5_features/0_small_object.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _Small Object:
2
+
3
+ Small Object
4
+ ============
docs/5_features/1_version_convert.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _Version Convert:
2
+
3
+ Version Convert
4
+ ===============
docs/5_features/2_IPython.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _IPython:
2
+
3
+ IPython
4
+ =======
docs/6_function_docs/0_solver.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _Solver:
2
+
3
+ Solver
4
+ ======
docs/6_function_docs/1_tools.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _Tools:
2
+
3
+ Useful Tools
4
+ ============
docs/6_function_docs/2_module.rst ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .. _Module:
2
+
3
+ Model Module
4
+ ============
docs/conf.py CHANGED
@@ -13,6 +13,11 @@ author = "Kin-Yiu, Wong and Hao-Tang, Tsui"
13
  # -- General configuration ---------------------------------------------------
14
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15
 
 
 
 
 
 
16
  extensions = [
17
  "sphinx.ext.autodoc",
18
  "sphinx_rtd_theme",
 
13
  # -- General configuration ---------------------------------------------------
14
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15
 
16
+ import os
17
+ import sys
18
+
19
+ sys.path.insert(0, os.path.abspath(".."))
20
+
21
  extensions = [
22
  "sphinx.ext.autodoc",
23
  "sphinx_rtd_theme",
docs/index.rst CHANGED
@@ -25,55 +25,60 @@ Explore our documentation:
25
  :maxdepth: 2
26
  :caption: Get Started
27
 
28
- 0_get_start/0_quick_start.md
29
- 0_get_start/1_installations.md
30
- 0_get_start/2_git.md
31
- 0_get_start/3_pypi.md
32
- 0_get_start/4_docker.md
33
- 0_get_start/5_conda.md
34
 
35
  .. toctree::
36
  :maxdepth: 2
37
  :caption: Tutorials
38
 
39
- 1_tutorials/0_train.md
40
- 1_tutorials/1_validation.md
 
41
 
42
 
43
  .. toctree::
44
  :maxdepth: 2
45
  :caption: Model Zoo
46
 
47
- 2_model_zoo/0_object_detection.md
48
- 2_model_zoo/1_segmentation.md
49
- 2_model_zoo/2_classification.md
50
 
51
  .. toctree::
52
  :maxdepth: 2
53
  :caption: Custom YOLO
54
 
55
- 3_custom/0_model.md
56
- 3_custom/1_data_augment.md
57
- 3_custom/2_loss.md
58
- 3_custom/3_task.md
59
 
60
 
61
  .. toctree::
62
  :maxdepth: 2
63
  :caption: Deploy
64
 
65
- 4_deploy/1_deploy.md
66
- 4_deploy/2_onnx.md
67
- 4_deploy/3_tensorrt.md
68
 
69
 
70
  .. toctree::
71
  :maxdepth: 2
72
- :caption: Deploy
 
 
 
 
 
 
 
 
73
 
74
- 4_deploy/1_deploy.md
75
- 4_deploy/2_onnx.md
76
- 4_deploy/3_tensorrt.md
77
 
78
  License
79
  -------
 
25
  :maxdepth: 2
26
  :caption: Get Started
27
 
28
+ 0_get_start/0_quick_start
29
+ 0_get_start/1_installations
 
 
 
 
30
 
31
  .. toctree::
32
  :maxdepth: 2
33
  :caption: Tutorials
34
 
35
+ 1_tutorials/0_train
36
+ 1_tutorials/1_validation
37
+ 1_tutorials/2_inference
38
 
39
 
40
  .. toctree::
41
  :maxdepth: 2
42
  :caption: Model Zoo
43
 
44
+ 2_model_zoo/0_object_detection
45
+ 2_model_zoo/1_segmentation
46
+ 2_model_zoo/2_classification
47
 
48
  .. toctree::
49
  :maxdepth: 2
50
  :caption: Custom YOLO
51
 
52
+ 3_custom/0_model
53
+ 3_custom/1_data_augment
54
+ 3_custom/2_loss
55
+ 3_custom/3_task
56
 
57
 
58
  .. toctree::
59
  :maxdepth: 2
60
  :caption: Deploy
61
 
62
+ 4_deploy/1_deploy
63
+ 4_deploy/2_onnx
64
+ 4_deploy/3_tensorrt
65
 
66
 
67
  .. toctree::
68
  :maxdepth: 2
69
+ :caption: Features
70
+
71
+ 5_features/0_small_object
72
+ 5_features/1_version_convert
73
+ 5_features/2_IPython
74
+
75
+ .. toctree::
76
+ :maxdepth: 2
77
+ :caption: Function Docs
78
 
79
+ 6_function_docs/0_solver
80
+ 6_function_docs/1_tools
81
+ 6_function_docs/2_module
82
 
83
  License
84
  -------