yolov5 for semantic segmentation which based on flexible-yolov5.
- Provide model structure, such as backbone, neck, head, can modify the network flexibly and conveniently
- backbone: yolov5s
- neck: FPN, PAN
- head: segmentation head
please refer to requirements.txt
- Download coco or cityscapes dataset.
- Modify your dataset path in
configs/data.yaml
.
There are some modifies in classes grouping with cityscapes dataset
.
- Change: 19 classes ——> 9 classes (See the code details in cityscapes.py. But don't worry, I have add the input param
group(bool)
which can be set asFalse
to backend 19 classes in training and visualizing. )
For training, it's same like yolov5.
You can modify your setup in train_cityscapes.sh
.
$ ./train_cityscapes.sh
Tensorboard is automatically started while training. You can see the visualizition results in tensorboard.
You can modify your setup in visualize.sh
.
$ ./visualize.sh
Here is the visualization of cityscapes with 9 classes(ground truth is 19 classes).