Skip to content
Snippets Groups Projects
Commit 383cb532 authored by chenjun2hao's avatar chenjun2hao
Browse files

add own pretrained model

parent 2caaa157
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ Here I list the software and hardware used in my experiment
You need to download the [Cityscapes](https://www.cityscapes-dataset.com/)datasets. and rename the folder `cityscapes`, then put the data under `data` folder.
```
|--data
└── data
├── cityscapes
└── list
```
......@@ -39,7 +39,7 @@ download the pretrained model on imagenet or the segmentation model from the [of
## VAL
use the [official pretrained model](https://github.com/ydhongHIT/DDRNet) for eval.
use the [official pretrained model](https://github.com/ydhongHIT/DDRNet) and our `eval.py` code. so the result may different from official.
```python
cd ${PROJECT}
......@@ -48,10 +48,14 @@ python tools/eval.py --cfg experiments/cityscapes/ddrnet23_slim.yaml
| model | Train Set | Test Set | OHEM | Multi-scale| Flip | mIoU | Link |
| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |
| DDRNet23_slim | unknown | eval | unknown | No | Yes | 77.40 | [official](https://github.com/ydhongHIT/DDRNet) |
| DDRNet23 | unknown | eval | unknown | No | Yes | 79.40 | [official](https://github.com/ydhongHIT/DDRNet) |
| DDRNet39 | unknown | eval | unknown | No | Yes | 80.40 | [official](https://github.com/ydhongHIT/DDRNet) |
| DDRNet39 | unknown | eval | unknown | Yes | Yes | 81.9 | [official](https://github.com/ydhongHIT/DDRNet) |
| DDRNet23_slim | unknown | eval | Yes | No | No | 76.83 | [official](https://github.com/ydhongHIT/DDRNet) |
| DDRNet23_slim | unknown | eval | Yes | No | Yes| 77.40 | [official](https://github.com/ydhongHIT/DDRNet) |
| DDRNet23 | unknown | eval | Yes | No | No | 78.41 | [official](https://github.com/ydhongHIT/DDRNet) |
| DDRNet23 | unknown | eval | Yes | No | Yes| 78.85 | [official](https://github.com/ydhongHIT/DDRNet) |
**Note**
- [the official repository](https://github.com/ydhongHIT/DDRNet) on DDRNet23_slim without Flip can reach 77.40 on cityscapes dataset
## TRAIN
......@@ -65,10 +69,20 @@ python -m torch.distributed.launch --nproc_per_node=2 tools/train.py --cfg exper
**the own trained model coming soon**
## OWN model
| model | Train Set | Test Set | OHEM | Multi-scale| Flip | mIoU | Link |
| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |
| DDRNet23_slim | train | eval | Yes | No | Yes | 77.77 | [Baidu/password:it2s](https://pan.baidu.com/s/17pOOTc-HBG6TNf4k_cn4VA) |
| DDRNet23_slim | train | eval | Yes | Yes| Yes | 79.57 | [Baidu/password:it2s](https://pan.baidu.com/s/17pOOTc-HBG6TNf4k_cn4VA) |
| DDRNet23 | train | eval | Yes | No | Yes | ~ | None |
| DDRNet39 | train | eval | Yes | No | Yes | ~ | None |
**Note**
- Multi-scale with scales: 0.5,0.75,1.0,1.25,1.5,1.75. it runs too slow.
- from [ydhongHIT](https://github.com/ydhongHIT), can change the `align_corners=True` with better performance, the default option is `False`
## Reference
[1] [HRNet-Semantic-Segmentation OCR](https://github.com/HRNet/HRNet-Semantic-Segmentation/tree/HRNet-OCR)
[1] [HRNet-Semantic-Segmentation OCR branch](https://github.com/HRNet/HRNet-Semantic-Segmentation/tree/HRNet-OCR)
[2] [the official repository](https://github.com/ydhongHIT/DDRNet)
......@@ -49,6 +49,7 @@ TEST:
- 1024
BASE_SIZE: 2048
BATCH_SIZE_PER_GPU: 4
FLIP_TEST: true
FLIP_TEST: false
MULTI_SCALE: false
MODEL_FILE: "pretrained_models/best_val.pth.pth"
MODEL_FILE: "pretrained_models/best_val.pth"
OUTPUT_INDEX: 0
......@@ -51,4 +51,7 @@ TEST:
BATCH_SIZE_PER_GPU: 4
FLIP_TEST: true
MULTI_SCALE: false
SCALE_LIST: [1]
#0.5,0.75,1.0,1.25,1.5,1.75
MODEL_FILE: "pretrained_models/best_val_smaller.pth"
OUTPUT_INDEX: 0
......@@ -22,7 +22,7 @@ LOSS:
USE_OHEM: true
OHEMTHRES: 0.9
OHEMKEEP: 131072
BALANCE_WEIGHTS: [0.4, 1]
BALANCE_WEIGHTS: [1, 0.4]
TRAIN:
IMAGE_SIZE:
- 1024
......@@ -52,3 +52,4 @@ TEST:
FLIP_TEST: true
MULTI_SCALE: false
MODEL_FILE:
OUTPUT_INDEX: 0
......@@ -11,3 +11,5 @@ from __future__ import print_function
import models.seg_hrnet
import models.seg_hrnet_ocr
import models.ddrnet_23_slim
import models.ddrnet_23
import models.ddrnet_39
\ No newline at end of file
......@@ -35,7 +35,7 @@ def parse_args():
parser.add_argument('--cfg',
help='experiment configure file name',
default="experiments/cityscapes/ddrnet_slim.yaml",
default="experiments/cityscapes/ddrnet23_slim.yaml",
type=str)
parser.add_argument('opts',
help="Modify config options using the command-line",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment