open-mmlab / OpenMMLabCamp

Apache License 2.0
94 stars 32 forks source link

【AI实战营第二期】第四次作业提交07班 #388

Open chg0901 opened 1 year ago

chg0901 commented 1 year ago

作业:MMSeg 语义分割

背景:西瓜瓤、西瓜皮、西瓜籽像素级语义分割

TO DO LIST:

  1. Labelme 标注语义分割数据集(子豪兄已经帮你完成了)
  2. 划分训练集和测试集(子豪兄已经帮你完成了)
  3. Labelme 标注转 Mask 灰度图格式(子豪兄已经帮你完成了)
  4. 使用 MMSegmentation 算法库,撰写 config 配置文件,训练 PSPNet 语义分割算法
  5. 提交测试集评估指标
  6. 使用数据集之外的西瓜图片和视频进行预测,并存储展示预测的结果。
  7. 训练 Segformer 语义分割算法,提交测试集评估指标

西瓜瓤、西瓜籽数据集:

标注:同济子豪兄 image

image

image

数据集下载链接:

需提交的测试集评估指标:(不能低于 baseline 指标的 50%

需要提交的其他文件

  1. 训练config
  2. 训练日志log和输出文件夹work_dirs
  3. 测试图片视频原图即推理后的图片视频
  4. 评估指标,config路径地址,log地址,图片视频地址放在提交文件夹的readme.md文件中
mm-assistant[bot] commented 1 year ago

We recommend using English or English & Chinese for issues so that we could have broader discussion.

xixihic commented 1 year ago

作业链接:https://github.com/xixihic/openmmlabhomework/tree/master/MMSegmentation 两个网络:PSPNet和Segformer, 都出现了训练感觉还可以,但是换张图想效果不是很好

chg0901 commented 1 year ago

Github Link

https://github.com/chg0901/openmmlab2-hong/tree/main/Assignment4

作业结果

1. Config

./mmsegmentation/pspnet-Watermelon87_Semantic_Seg_Mask_20230616.py

2. Evaluation

3. Training logs

./work_dirs/Watermelon87_Semantic_Seg_Mask/20230616_114954/20230616_114954.log

4. Test logs

Outputs is the same as the above train outputs since we test evey 400 epoch during training. .work_dirs/Watermelon87_Semantic_Seg_Mask/20230616_160732/20230616_160732.log

+------------+-------+-------+
|   Class    |  IoU  |  Acc  |
+------------+-------+-------+
|    Red     | 92.13 | 96.03 |
|   Green    | 87.87 | 91.65 |
|   White    | 77.85 | 91.88 |
| Seed-black | 84.83 | 93.94 |
| Seed-white | 68.25 | 73.52 |
| Unlabeled  | 52.67 |  73.6 |
+------------+-------+-------+
2023/06/16 12:09:59 - mmengine - INFO - Iter(val) [11/11]  
aAcc: 94.2700  mIoU: 77.2600  mAcc: 86.7700  data_time: 0.0016  time: 0.2658

2023/06/16 12:09:59 - mmengine - INFO - The previous best checkpoint /home/cine/Documents/GitHub/mmsegmentation/work_dirs/Watermelon87_Semantic_Seg_Mask/best_mAcc_iter_3600.pth is removed
2023/06/16 12:10:00 - mmengine - INFO - The best checkpoint with 86.7700 mAcc at 7600 iter is saved to best_mAcc_iter_7600.pth.
2023/06/16 12:10:00 - mmengine - INFO - The previous best checkpoint /home/cine/Documents/GitHub/mmsegmentation/work_dirs/Watermelon87_Semantic_Seg_Mask/best_mIoU_iter_2800.pth is removed
2023/06/16 12:10:01 - mmengine - INFO - The best checkpoint with 77.2600 mIoU at 7600 iter is saved to best_mIoU_iter_7600.pth.

5. Test and Visualization

Datafolder: ./mmsegmentation/data/

  1. Images

Image 1: https://github.com/chg0901/openmmlab2-hong/tree/main/Assignment4/mmsegmentation/data/watermelon_2.png Prediction1: https://github.com/chg0901/openmmlab2-hong/tree/main/Assignment4/mmsegmentation/data/watermelon_2_pred.png

Image 2: https://github.com/chg0901/openmmlab2-hong/tree/main/Assignment4/mmsegmentation/data/watermelon.png Prediction2: https://github.com/chg0901/openmmlab2-hong/tree/main/Assignment4/mmsegmentation/data/watermelon_pred.png

  1. Videos

original https://github.com/chg0901/openmmlab2-hong/tree/main/Assignment4/mmsegmentation/data/watermelon2.gif Prediction https://github.com/chg0901/openmmlab2-hong/tree/main/Assignment4/mmsegmentation/data/watermelon_pred2_.gif

JeffDing commented 1 year ago

代码仓地址:https://github.com/JeffDing/mmlabcamp/tree/main/第二期/mmsegmentation/Homework4.ipynb

训练config:在mmsegmentation/logs文件夹下 训练日志log和输出文件夹work_dirs:work_dirs太大了就不上传了 测试图片视频原图即推理后的图片视频:mmsegmentation/results目录下为结果文件 评估指标,提示没有注册数据集,还在研究中

Caczhtus commented 1 year ago

代码仓库地址:link

+------------+-------+-------+
|   Class    |  IoU  |  Acc  |
+------------+-------+-------+
| background |  91.0 | 92.18 |
|    red     |  93.7 | 97.95 |
|   green    | 60.05 |  92.1 |
|   white    | 81.88 | 90.53 |
| seed-black | 74.24 | 85.98 |
| seed-white | 57.59 | 71.57 |
+------------+-------+-------+
06/18 16:46:44 - mmengine - INFO - Iter(test) [11/11]    aAcc: 93.5200  mIoU: 76.4100  mAcc: 88.3800  data_time: 0.2213  time: 7.7713
L-369-maha commented 1 year ago

https://github.com/L-369-maha/OpenMMLab/tree/main/mmsegmentation