Skip to content

Commit 7dabbe1

Browse files
[misc] Rename reference scripts & corr CI job paths (#1985)
1 parent 183f0ff commit 7dabbe1

File tree

14 files changed

+22
-22
lines changed

14 files changed

+22
-22
lines changed

.github/workflows/references.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
pip install -r references/requirements.txt
3737
sudo apt-get update && sudo apt-get install fonts-freefont-ttf -y
3838
- name: Train for a short epoch
39-
run: python references/classification/train_pytorch_character.py vit_s -b 32 --val-samples 1 --train-samples 1 --epochs 1
39+
run: python references/classification/train_character.py vit_s -b 32 --val-samples 1 --train-samples 1 --epochs 1
4040

4141
train-orientation-classification:
4242
runs-on: ${{ matrix.os }}
@@ -75,9 +75,9 @@ jobs:
7575
sudo apt-get update && sudo apt-get install unzip -y
7676
unzip toy_recogition_set-036a4d80.zip -d reco_set
7777
- name: Train for a short epoch (document orientation)
78-
run: python references/classification/train_pytorch_orientation.py resnet18 --type page --train_path ./det_set --val_path ./det_set -b 2 --epochs 1
78+
run: python references/classification/train_orientation.py resnet18 --type page --train_path ./det_set --val_path ./det_set -b 2 --epochs 1
7979
- name: Train for a short epoch (crop orientation)
80-
run: python references/classification/train_pytorch_orientation.py resnet18 --type crop --train_path ./reco_set --val_path ./reco_set -b 4 --epochs 1
80+
run: python references/classification/train_orientation.py resnet18 --type crop --train_path ./reco_set --val_path ./reco_set -b 4 --epochs 1
8181

8282
train-text-recognition:
8383
runs-on: ${{ matrix.os }}
@@ -111,7 +111,7 @@ jobs:
111111
sudo apt-get update && sudo apt-get install unzip -y
112112
unzip toy_recogition_set-036a4d80.zip -d reco_set
113113
- name: Train for a short epoch
114-
run: python references/recognition/train_pytorch.py crnn_mobilenet_v3_small --train_path ./reco_set --val_path ./reco_set -b 4 --epochs 1
114+
run: python references/recognition/train.py crnn_mobilenet_v3_small --train_path ./reco_set --val_path ./reco_set -b 4 --epochs 1
115115

116116
evaluate-text-recognition:
117117
runs-on: ${{ matrix.os }}
@@ -137,7 +137,7 @@ jobs:
137137
python -m pip install --upgrade pip
138138
pip install -e .[viz,html] --upgrade
139139
- name: Evaluate text recognition
140-
run: python references/recognition/evaluate_pytorch.py crnn_mobilenet_v3_small --dataset SVT -b 32
140+
run: python references/recognition/evaluate.py crnn_mobilenet_v3_small --dataset SVT -b 32
141141

142142
latency-text-recognition:
143143
runs-on: ${{ matrix.os }}
@@ -163,7 +163,7 @@ jobs:
163163
python -m pip install --upgrade pip
164164
pip install -e .[viz,html] --upgrade
165165
- name: Benchmark latency
166-
run: python references/recognition/latency_pytorch.py crnn_mobilenet_v3_small --it 5
166+
run: python references/recognition/latency.py crnn_mobilenet_v3_small --it 5
167167

168168
train-text-detection:
169169
runs-on: ${{ matrix.os }}
@@ -197,7 +197,7 @@ jobs:
197197
sudo apt-get update && sudo apt-get install unzip -y
198198
unzip toy_detection_set-bbbb4243.zip -d det_set
199199
- name: Train for a short epoch
200-
run: python references/detection/train_pytorch.py db_mobilenet_v3_large --train_path ./det_set --val_path ./det_set -b 2 --epochs 1
200+
run: python references/detection/train.py db_mobilenet_v3_large --train_path ./det_set --val_path ./det_set -b 2 --epochs 1
201201

202202
evaluate-text-detection:
203203
runs-on: ${{ matrix.os }}
@@ -224,7 +224,7 @@ jobs:
224224
pip install -e .[viz,html] --upgrade
225225
pip install -r references/requirements.txt
226226
- name: Evaluate text detection
227-
run: python references/detection/evaluate_pytorch.py db_mobilenet_v3_large
227+
run: python references/detection/evaluate.py db_mobilenet_v3_large
228228

229229
latency-text-detection:
230230
runs-on: ${{ matrix.os }}
@@ -250,4 +250,4 @@ jobs:
250250
python -m pip install --upgrade pip
251251
pip install -e .[viz,html] --upgrade
252252
- name: Benchmark latency
253-
run: python references/detection/latency_pytorch.py db_mobilenet_v3_large --it 5 --size 512
253+
run: python references/detection/latency.py db_mobilenet_v3_large --it 5 --size 512

docs/source/using_doctr/sharing_models.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ It is also possible to push your model directly after training.
4848

4949
.. code:: bash
5050
51-
python3 ~/doctr/references/recognition/train_pytorch.py crnn_mobilenet_v3_large --name doctr-crnn-mobilenet-v3-large --push-to-hub
51+
python3 ~/doctr/references/recognition/train.py crnn_mobilenet_v3_large --name doctr-crnn-mobilenet-v3-large --push-to-hub
5252
5353
5454
Pretrained community models

references/classification/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ pip install -r references/requirements.txt
1616
You can start your training in PyTorch:
1717

1818
```shell
19-
python references/classification/train_pytorch_character.py mobilenet_v3_large --epochs 5 --device 0
19+
python references/classification/train_character.py mobilenet_v3_large --epochs 5 --device 0
2020
```
2121

2222
## Usage orientation classification
2323

2424
You can start your training in PyTorch:
2525

2626
```shell
27-
python references/classification/train_pytorch_orientation.py resnet18 --type page --train_path path/to/your/train_set --val_path path/to/your/val_set --epochs 5
27+
python references/classification/train_orientation.py resnet18 --type page --train_path path/to/your/train_set --val_path path/to/your/val_set --epochs 5
2828
```
2929

3030
The type can be either `page` for document images or `crop` for word crops.
@@ -58,11 +58,11 @@ Feel free to inspect the multiple script option to customize your training to yo
5858
Character classification:
5959

6060
```shell
61-
python references/classification/train_pytorch_character.py --help
61+
python references/classification/train_character.py --help
6262
```
6363

6464
Orientation classification:
6565

6666
```shell
67-
python references/classification/train_pytorch_orientation.py --help
67+
python references/classification/train_orientation.py --help
6868
```

references/detection/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pip install -r references/requirements.txt
1616
You can start your training in PyTorch:
1717

1818
```shell
19-
python references/detection/train_pytorch.py db_resnet50 --train_path path/to/your/train_set --val_path path/to/your/val_set --epochs 5
19+
python references/detection/train.py db_resnet50 --train_path path/to/your/train_set --val_path path/to/your/val_set --epochs 5
2020
```
2121

2222
### Multi-GPU support
@@ -41,7 +41,7 @@ By default all visible GPUs will be used. To limit which GPUs participate, set t
4141

4242
```shell
4343
CUDA_VISIBLE_DEVICES=0,2 \
44-
torchrun --nproc_per_node=2 references/detection/train_pytorch.py \
44+
torchrun --nproc_per_node=2 references/detection/train.py \
4545
db_resnet50 \
4646
--train_path path/to/train \
4747
--val_path path/to/val \
@@ -124,5 +124,5 @@ You can follow this page on [how to create a Slack App](https://api.slack.com/qu
124124
Feel free to inspect the multiple script option to customize your training to your own needs!
125125

126126
```python
127-
python references/detection/train_pytorch.py --help
127+
python references/detection/train.py --help
128128
```
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)