rayleizhu / BiFormer

[CVPR 2023] Official code release of our paper "BiFormer: Vision Transformer with Bi-Level Routing Attention"
https://arxiv.org/abs/2303.08810
MIT License
460 stars 36 forks source link

about the results #6

Closed ZhangIceNight closed 1 year ago

ZhangIceNight commented 1 year ago

Thank you for your work! I have run the script in segmentation part, but I can not get the results in paper. This is my script:

MODEL=upernet.biformer_small
OUTPUT_DIR=/home/h3c/workspace/results/biformer/seg

CONFIG_DIR=configs/ade20k
CONFIG=${CONFIG_DIR}/${MODEL}.py

NOW=$(date '+%m-%d-%H:%M:%S')
WORK_DIR=${OUTPUT_DIR}/${MODEL}/${NOW}
CKPT=/home/h3c/workspace/codes/BiFormer/biformer_small_best.pth

python -m torch.distributed.launch --nproc_per_node=2 --master_port=25643 train.py ${CONFIG} \
            --launcher="pytorch" \
            --work-dir=${WORK_DIR} \
            --options model.pretrained=${CKPT} \

I just use the checkpoint you released in classification part and follow all the parameters in /BiFormer/semantic_segmentation/configs/ade20k/upernet.biformer_small.py

After training for 160K iter,I got the mIoU of 45.32%

{"mode": "val", "epoch": 32, "iter": 1000, "lr": 0.0, "aAcc": 0.8157, "mIoU": 0.4532, "mAcc": 0.6129, "IoU.wall": 0.7498, "IoU.building": 0.8148, "IoU.sky": 0.9405, "IoU.floor": 0.8119, "IoU.tree": 0.7525, "IoU.ceiling": 0.8209, "IoU.road": 0.8311, "IoU.bed ": 0.8721, "IoU.windowpane": 0.6067, "IoU.grass": 0.689, "IoU.cabinet": 0.572, "IoU.sidewalk": 0.6193, "IoU.person": 0.775, "IoU.earth": 0.3497, "IoU.door": 0.4682, "IoU.table": 0.5372, "IoU.mountain": 0.5628, "IoU.plant": 0.5036, "IoU.curtain": 0.7305, "IoU.chair": 0.5011, "IoU.car": 0.8192, "IoU.water": 0.5351, "IoU.painting": 0.6741, "IoU.sofa": 0.5771, "IoU.shelf": 0.3926, "IoU.house": 0.4642, "IoU.sea": 0.6092, "IoU.mirror": 0.6144, "IoU.rug": 0.6618, "IoU.field": 0.3732, "IoU.armchair": 0.34, "IoU.seat": 0.6288, "IoU.fence": 0.4776, "IoU.desk": 0.4634, "IoU.rock": 0.4338, "IoU.wardrobe": 0.4775, "IoU.lamp": 0.5535, "IoU.bathtub": 0.6855, "IoU.railing": 0.3617, "IoU.cushion": 0.5055, "IoU.base": 0.3135, "IoU.box": 0.1889, "IoU.column": 0.4427, "IoU.signboard": 0.3714, "IoU.chest of drawers": 0.3435, "IoU.counter": 0.3965, "IoU.sand": 0.4167, "IoU.sink": 0.6428, "IoU.skyscraper": 0.4852, "IoU.fireplace": 0.6056, "IoU.refrigerator": 0.6387, "IoU.grandstand": 0.382, "IoU.path": 0.2026, "IoU.stairs": 0.3024, "IoU.runway": 0.6852, "IoU.case": 0.6331, "IoU.pool table": 0.9035, "IoU.pillow": 0.5455, "IoU.screen door": 0.5381, "IoU.stairway": 0.3905, "IoU.river": 0.1623, "IoU.bridge": 0.5883, "IoU.bookcase": 0.3064, "IoU.blind": 0.4062, "IoU.coffee table": 0.4865, "IoU.toilet": 0.73, "IoU.flower": 0.362, "IoU.book": 0.4247, "IoU.hill": 0.1346, "IoU.bench": 0.3971, "IoU.countertop": 0.4909, "IoU.stove": 0.6121, "IoU.palm": 0.4961, "IoU.kitchen island": 0.3359, "IoU.computer": 0.5765, "IoU.swivel chair": 0.4285, "IoU.boat": 0.3019, "IoU.bar": 0.4825, "IoU.arcade machine": 0.6025, "IoU.hovel": 0.298, "IoU.bus": 0.799, "IoU.towel": 0.6117, "IoU.light": 0.4729, "IoU.truck": 0.2551, "IoU.tower": 0.2966, "IoU.chandelier": 0.6189, "IoU.awning": 0.3284, "IoU.streetlight": 0.2013, "IoU.booth": 0.3303, "IoU.television receiver": 0.6494, "IoU.airplane": 0.5304, "IoU.dirt track": 0.112, "IoU.apparel": 0.3022, "IoU.pole": 0.1561, "IoU.land": 0.0165, "IoU.bannister": 0.0477, "IoU.escalator": 0.4338, "IoU.ottoman": 0.4951, "IoU.bottle": 0.1214, "IoU.buffet": 0.4683, "IoU.poster": 0.137, "IoU.stage": 0.1453, "IoU.van": 0.4185, "IoU.ship": 0.5525, "IoU.fountain": 0.243, "IoU.conveyer belt": 0.535, "IoU.canopy": 0.1664, "IoU.washer": 0.6119, "IoU.plaything": 0.2774, "IoU.swimming pool": 0.5712, "IoU.stool": 0.3033, "IoU.barrel": 0.379, "IoU.basket": 0.3221, "IoU.waterfall": 0.7458, "IoU.tent": 0.7565, "IoU.bag": 0.0769, "IoU.minibike": 0.6268, "IoU.cradle": 0.5708, "IoU.oven": 0.3523, "IoU.ball": 0.4085, "IoU.food": 0.4589, "IoU.step": 0.0194, "IoU.tank": 0.494, "IoU.trade name": 0.2347, "IoU.microwave": 0.7802, "IoU.pot": 0.3467, "IoU.animal": 0.5789, "IoU.bicycle": 0.5363, "IoU.lake": 0.5452, "IoU.dishwasher": 0.4162, "IoU.screen": 0.519, "IoU.blanket": 0.0402, "IoU.sculpture": 0.4434, "IoU.hood": 0.5812, "IoU.sconce": 0.2392, "IoU.vase": 0.2684, "IoU.traffic light": 0.1992, "IoU.tray": 0.0305, "IoU.ashcan": 0.3684, "IoU.fan": 0.5163, "IoU.pier": 0.3581, "IoU.crt screen": 0.0402, "IoU.plate": 0.5139, "IoU.monitor": 0.0864, "IoU.bulletin board": 0.4406, "IoU.shower": 0.0077, "IoU.radiator": 0.5858, "IoU.glass": 0.0791, "IoU.clock": 0.2303, "IoU.flag": 0.3673, "Acc.wall": 0.8514, "Acc.building": 0.9065, "Acc.sky": 0.9687, "Acc.floor": 0.8836, "Acc.tree": 0.8716, "Acc.ceiling": 0.8823, "Acc.road": 0.8934, "Acc.bed ": 0.9423, "Acc.windowpane": 0.7647, "Acc.grass": 0.8592, "Acc.cabinet": 0.6884, "Acc.sidewalk": 0.7713, "Acc.person": 0.8835, "Acc.earth": 0.47, "Acc.door": 0.6218, "Acc.table": 0.693, "Acc.mountain": 0.7681, "Acc.plant": 0.623, "Acc.curtain": 0.8565, "Acc.chair": 0.6319, "Acc.car": 0.9061, "Acc.water": 0.6655, "Acc.painting": 0.8565, "Acc.sofa": 0.7563, "Acc.shelf": 0.5809, "Acc.house": 0.7459, "Acc.sea": 0.8515, "Acc.mirror": 0.7218, "Acc.rug": 0.7969, "Acc.field": 0.5453, "Acc.armchair": 0.5544, "Acc.seat": 0.8609, "Acc.fence": 0.6484, "Acc.desk": 0.7283, "Acc.rock": 0.6883, "Acc.wardrobe": 0.7032, "Acc.lamp": 0.7083, "Acc.bathtub": 0.8115, "Acc.railing": 0.4746, "Acc.cushion": 0.6132, "Acc.base": 0.5948, "Acc.box": 0.2305, "Acc.column": 0.6038, "Acc.signboard": 0.4677, "Acc.chest of drawers": 0.5021, "Acc.counter": 0.4562, "Acc.sand": 0.588, "Acc.sink": 0.7237, "Acc.skyscraper": 0.6147, "Acc.fireplace": 0.8795, "Acc.refrigerator": 0.8517, "Acc.grandstand": 0.8288, "Acc.path": 0.3338, "Acc.stairs": 0.3531, "Acc.runway": 0.954, "Acc.case": 0.8407, "Acc.pool table": 0.9591, "Acc.pillow": 0.7043, "Acc.screen door": 0.8156, "Acc.stairway": 0.4694, "Acc.river": 0.3618, "Acc.bridge": 0.8505, "Acc.bookcase": 0.5925, "Acc.blind": 0.4818, "Acc.coffee table": 0.8091, "Acc.toilet": 0.9159, "Acc.flower": 0.5195, "Acc.book": 0.6065, "Acc.hill": 0.219, "Acc.bench": 0.5155, "Acc.countertop": 0.6636, "Acc.stove": 0.7709, "Acc.palm": 0.7272, "Acc.kitchen island": 0.8012, "Acc.computer": 0.7625, "Acc.swivel chair": 0.7474, "Acc.boat": 0.5022, "Acc.bar": 0.6881, "Acc.arcade machine": 0.8357, "Acc.hovel": 0.4787, "Acc.bus": 0.9661, "Acc.towel": 0.7556, "Acc.light": 0.5349, "Acc.truck": 0.4912, "Acc.tower": 0.6598, "Acc.chandelier": 0.8069, "Acc.awning": 0.4226, "Acc.streetlight": 0.2572, "Acc.booth": 0.6564, "Acc.television receiver": 0.8086, "Acc.airplane": 0.704, "Acc.dirt track": 0.3559, "Acc.apparel": 0.3625, "Acc.pole": 0.1917, "Acc.land": 0.0255, "Acc.bannister": 0.0705, "Acc.escalator": 0.8254, "Acc.ottoman": 0.5913, "Acc.bottle": 0.1328, "Acc.buffet": 0.6984, "Acc.poster": 0.1911, "Acc.stage": 0.452, "Acc.van": 0.5686, "Acc.ship": 0.9553, "Acc.fountain": 0.2597, "Acc.conveyer belt": 0.9528, "Acc.canopy": 0.3348, "Acc.washer": 0.7959, "Acc.plaything": 0.5114, "Acc.swimming pool": 0.835, "Acc.stool": 0.4093, "Acc.barrel": 0.6512, "Acc.basket": 0.3959, "Acc.waterfall": 0.9322, "Acc.tent": 0.9926, "Acc.bag": 0.0848, "Acc.minibike": 0.8096, "Acc.cradle": 0.8412, "Acc.oven": 0.5692, "Acc.ball": 0.6886, "Acc.food": 0.5119, "Acc.step": 0.0243, "Acc.tank": 0.6731, "Acc.trade name": 0.258, "Acc.microwave": 0.9172, "Acc.pot": 0.4097, "Acc.animal": 0.6256, "Acc.bicycle": 0.7739, "Acc.lake": 0.6362, "Acc.dishwasher": 0.5984, "Acc.screen": 0.8872, "Acc.blanket": 0.0459, "Acc.sculpture": 0.6051, "Acc.hood": 0.656, "Acc.sconce": 0.2872, "Acc.vase": 0.3981, "Acc.traffic light": 0.4289, "Acc.tray": 0.0337, "Acc.ashcan": 0.5113, "Acc.fan": 0.7614, "Acc.pier": 0.7415, "Acc.crt screen": 0.1154, "Acc.plate": 0.6714, "Acc.monitor": 0.1304, "Acc.bulletin board": 0.5742, "Acc.shower": 0.0081, "Acc.radiator": 0.6818, "Acc.glass": 0.0807, "Acc.clock": 0.2586, "Acc.flag": 0.4091}

Besides, I try the new version bra_nchw.py, but I just got a lower performance of about 31% mIoU.

Sorry, Am I doing something wrong?

rayleizhu commented 1 year ago
  1. What's the batch size (num_gpus*samples_per_gpu)? We use 8*4=32.
  2. Without parameter remapping, current checkpoints are incompatible with bra_nchw.py. How did you get it to work? I recommend you use legacy implementation, though. Otherwise, you need to convert the checkpoint by yourself.
ZhangIceNight commented 1 year ago
  1. What's the batch size (num_gpussamples_per_gpu)? We use 84=32.
  2. Without parameter remapping, current checkpoints are incompatible with bra_nchw.py. How did you get it to work? I recommend you use legacy implementation, though. Otherwise, you need to convert the checkpoint by yourself.
  1. I use 24=8 batch, what should I do ? can I use 216 to follow your batch size?
  2. Thank you, I got it. I will use the legacy version.
rayleizhu commented 1 year ago
  1. I use 2_4=8 batch, what should I do ? can I use 2_16 to follow your batch size?

Yes, it should be equivalent.

Otherwise, you may try linearly scaling the learning rate (i.e. use smaller lr for smaller batch size), I do not know if it works well though.

ZhangIceNight commented 1 year ago

Thank you very much! I will try it.

vittoria310 commented 1 year ago

非常感谢!我会尝试。

感谢您的工作! 我在分割部分运行了脚本,但我无法在纸上得到结果。 这是我的脚本:

MODEL=upernet.biformer_small
OUTPUT_DIR=/home/h3c/workspace/results/biformer/seg

CONFIG_DIR=configs/ade20k
CONFIG=${CONFIG_DIR}/${MODEL}.py

NOW=$(date '+%m-%d-%H:%M:%S')
WORK_DIR=${OUTPUT_DIR}/${MODEL}/${NOW}
CKPT=/home/h3c/workspace/codes/BiFormer/biformer_small_best.pth

python -m torch.distributed.launch --nproc_per_node=2 --master_port=25643 train.py ${CONFIG} \
            --launcher="pytorch" \
            --work-dir=${WORK_DIR} \
            --options model.pretrained=${CKPT} \

我只是使用你在分类部分发布的检查点并遵循中的所有参数/BiFormer/semantic_segmentation/configs/ade20k/upernet.biformer_small.py

经过160K iter的训练,得到了45.32%的mIoU

{"mode": "val", "epoch": 32, "iter": 1000, "lr": 0.0, "aAcc": 0.8157, "mIoU": 0.4532, "mAcc": 0.6129, "IoU.wall": 0.7498, "IoU.building": 0.8148, "IoU.sky": 0.9405, "IoU.floor": 0.8119, "IoU.tree": 0.7525, "IoU.ceiling": 0.8209, "IoU.road": 0.8311, "IoU.bed ": 0.8721, "IoU.windowpane": 0.6067, "IoU.grass": 0.689, "IoU.cabinet": 0.572, "IoU.sidewalk": 0.6193, "IoU.person": 0.775, "IoU.earth": 0.3497, "IoU.door": 0.4682, "IoU.table": 0.5372, "IoU.mountain": 0.5628, "IoU.plant": 0.5036, "IoU.curtain": 0.7305, "IoU.chair": 0.5011, "IoU.car": 0.8192, "IoU.water": 0.5351, "IoU.painting": 0.6741, "IoU.sofa": 0.5771, "IoU.shelf": 0.3926, "IoU.house": 0.4642, "IoU.sea": 0.6092, "IoU.mirror": 0.6144, "IoU.rug": 0.6618, "IoU.field": 0.3732, "IoU.armchair": 0.34, "IoU.seat": 0.6288, "IoU.fence": 0.4776, "IoU.desk": 0.4634, "IoU.rock": 0.4338, "IoU.wardrobe": 0.4775, "IoU.lamp": 0.5535, "IoU.bathtub": 0.6855, "IoU.railing": 0.3617, "IoU.cushion": 0.5055, "IoU.base": 0.3135, "IoU.box": 0.1889, "IoU.column": 0.4427, "IoU.signboard": 0.3714, "IoU.chest of drawers": 0.3435, "IoU.counter": 0.3965, "IoU.sand": 0.4167, "IoU.sink": 0.6428, "IoU.skyscraper": 0.4852, "IoU.fireplace": 0.6056, "IoU.refrigerator": 0.6387, "IoU.grandstand": 0.382, "IoU.path": 0.2026, "IoU.stairs": 0.3024, "IoU.runway": 0.6852, "IoU.case": 0.6331, "IoU.pool table": 0.9035, "IoU.pillow": 0.5455, "IoU.screen door": 0.5381, "IoU.stairway": 0.3905, "IoU.river": 0.1623, "IoU.bridge": 0.5883, "IoU.bookcase": 0.3064, "IoU.blind": 0.4062, "IoU.coffee table": 0.4865, "IoU.toilet": 0.73, "IoU.flower": 0.362, "IoU.book": 0.4247, "IoU.hill": 0.1346, "IoU.bench": 0.3971, "IoU.countertop": 0.4909, "IoU.stove": 0.6121, "IoU.palm": 0.4961, "IoU.kitchen island": 0.3359, "IoU.computer": 0.5765, "IoU.swivel chair": 0.4285, "IoU.boat": 0.3019, "IoU.bar": 0.4825, "IoU.arcade machine": 0.6025, "IoU.hovel": 0.298, "IoU.bus": 0.799, "IoU.towel": 0.6117, "IoU.light": 0.4729, "IoU.truck": 0.2551, "IoU.tower": 0.2966, "IoU.chandelier": 0.6189, "IoU.awning": 0.3284, "IoU.streetlight": 0.2013, "IoU.booth": 0.3303, "IoU.television receiver": 0.6494, "IoU.airplane": 0.5304, "IoU.dirt track": 0.112, "IoU.apparel": 0.3022, "IoU.pole": 0.1561, "IoU.land": 0.0165, "IoU.bannister": 0.0477, "IoU.escalator": 0.4338, "IoU.ottoman": 0.4951, "IoU.bottle": 0.1214, "IoU.buffet": 0.4683, "IoU.poster": 0.137, "IoU.stage": 0.1453, "IoU.van": 0.4185, "IoU.ship": 0.5525, "IoU.fountain": 0.243, "IoU.conveyer belt": 0.535, "IoU.canopy": 0.1664, "IoU.washer": 0.6119, "IoU.plaything": 0.2774, "IoU.swimming pool": 0.5712, "IoU.stool": 0.3033, "IoU.barrel": 0.379, "IoU.basket": 0.3221, "IoU.waterfall": 0.7458, "IoU.tent": 0.7565, "IoU.bag": 0.0769, "IoU.minibike": 0.6268, "IoU.cradle": 0.5708, "IoU.oven": 0.3523, "IoU.ball": 0.4085, "IoU.food": 0.4589, "IoU.step": 0.0194, "IoU.tank": 0.494, "IoU.trade name": 0.2347, "IoU.microwave": 0.7802, "IoU.pot": 0.3467, "IoU.animal": 0.5789, "IoU.bicycle": 0.5363, "IoU.lake": 0.5452, "IoU.dishwasher": 0.4162, "IoU.screen": 0.519, "IoU.blanket": 0.0402, "IoU.sculpture": 0.4434, "IoU.hood": 0.5812, "IoU.sconce": 0.2392, "IoU.vase": 0.2684, "IoU.traffic light": 0.1992, "IoU.tray": 0.0305, "IoU.ashcan": 0.3684, "IoU.fan": 0.5163, "IoU.pier": 0.3581, "IoU.crt screen": 0.0402, "IoU.plate": 0.5139, "IoU.monitor": 0.0864, "IoU.bulletin board": 0.4406, "IoU.shower": 0.0077, "IoU.radiator": 0.5858, "IoU.glass": 0.0791, "IoU.clock": 0.2303, "IoU.flag": 0.3673, "Acc.wall": 0.8514, "Acc.building": 0.9065, "Acc.sky": 0.9687, "Acc.floor": 0.8836, "Acc.tree": 0.8716, "Acc.ceiling": 0.8823, "Acc.road": 0.8934, "Acc.bed ": 0.9423, "Acc.windowpane": 0.7647, "Acc.grass": 0.8592, "Acc.cabinet": 0.6884, "Acc.sidewalk": 0.7713, "Acc.person": 0.8835, "Acc.earth": 0.47, "Acc.door": 0.6218, "Acc.table": 0.693, "Acc.mountain": 0.7681, "Acc.plant": 0.623, "Acc.curtain": 0.8565, "Acc.chair": 0.6319, "Acc.car": 0.9061, "Acc.water": 0.6655, "Acc.painting": 0.8565, "Acc.sofa": 0.7563, "Acc.shelf": 0.5809, "Acc.house": 0.7459, "Acc.sea": 0.8515, "Acc.mirror": 0.7218, "Acc.rug": 0.7969, "Acc.field": 0.5453, "Acc.armchair": 0.5544, "Acc.seat": 0.8609, "Acc.fence": 0.6484, "Acc.desk": 0.7283, "Acc.rock": 0.6883, "Acc.wardrobe": 0.7032, "Acc.lamp": 0.7083, "Acc.bathtub": 0.8115, "Acc.railing": 0.4746, "Acc.cushion": 0.6132, "Acc.base": 0.5948, "Acc.box": 0.2305, "Acc.column": 0.6038, "Acc.signboard": 0.4677, "Acc.chest of drawers": 0.5021, "Acc.counter": 0.4562, "Acc.sand": 0.588, "Acc.sink": 0.7237, "Acc.skyscraper": 0.6147, "Acc.fireplace": 0.8795, "Acc.refrigerator": 0.8517, "Acc.grandstand": 0.8288, "Acc.path": 0.3338, "Acc.stairs": 0.3531, "Acc.runway": 0.954, "Acc.case": 0.8407, "Acc.pool table": 0.9591, "Acc.pillow": 0.7043, "Acc.screen door": 0.8156, "Acc.stairway": 0.4694, "Acc.river": 0.3618, "Acc.bridge": 0.8505, "Acc.bookcase": 0.5925, "Acc.blind": 0.4818, "Acc.coffee table": 0.8091, "Acc.toilet": 0.9159, "Acc.flower": 0.5195, "Acc.book": 0.6065, "Acc.hill": 0.219, "Acc.bench": 0.5155, "Acc.countertop": 0.6636, "Acc.stove": 0.7709, "Acc.palm": 0.7272, "Acc.kitchen island": 0.8012, "Acc.computer": 0.7625, "Acc.swivel chair": 0.7474, "Acc.boat": 0.5022, "Acc.bar": 0.6881, "Acc.arcade machine": 0.8357, "Acc.hovel": 0.4787, "Acc.bus": 0.9661, "Acc.towel": 0.7556, "Acc.light": 0.5349, "Acc.truck": 0.4912, "Acc.tower": 0.6598, "Acc.chandelier": 0.8069, "Acc.awning": 0.4226, "Acc.streetlight": 0.2572, "Acc.booth": 0.6564, "Acc.television receiver": 0.8086, "Acc.airplane": 0.704, "Acc.dirt track": 0.3559, "Acc.apparel": 0.3625, "Acc.pole": 0.1917, "Acc.land": 0.0255, "Acc.bannister": 0.0705, "Acc.escalator": 0.8254, "Acc.ottoman": 0.5913, "Acc.bottle": 0.1328, "Acc.buffet": 0.6984, "Acc.poster": 0.1911, "Acc.stage": 0.452, "Acc.van": 0.5686, "Acc.ship": 0.9553, "Acc.fountain": 0.2597, "Acc.conveyer belt": 0.9528, "Acc.canopy": 0.3348, "Acc.washer": 0.7959, "Acc.plaything": 0.5114, "Acc.swimming pool": 0.835, "Acc.stool": 0.4093, "Acc.barrel": 0.6512, "Acc.basket": 0.3959, "Acc.waterfall": 0.9322, "Acc.tent": 0.9926, "Acc.bag": 0.0848, "Acc.minibike": 0.8096, "Acc.cradle": 0.8412, "Acc.oven": 0.5692, "Acc.ball": 0.6886, "Acc.food": 0.5119, "Acc.step": 0.0243, "Acc.tank": 0.6731, "Acc.trade name": 0.258, "Acc.microwave": 0.9172, "Acc.pot": 0.4097, "Acc.animal": 0.6256, "Acc.bicycle": 0.7739, "Acc.lake": 0.6362, "Acc.dishwasher": 0.5984, "Acc.screen": 0.8872, "Acc.blanket": 0.0459, "Acc.sculpture": 0.6051, "Acc.hood": 0.656, "Acc.sconce": 0.2872, "Acc.vase": 0.3981, "Acc.traffic light": 0.4289, "Acc.tray": 0.0337, "Acc.ashcan": 0.5113, "Acc.fan": 0.7614, "Acc.pier": 0.7415, "Acc.crt screen": 0.1154, "Acc.plate": 0.6714, "Acc.monitor": 0.1304, "Acc.bulletin board": 0.5742, "Acc.shower": 0.0081, "Acc.radiator": 0.6818, "Acc.glass": 0.0807, "Acc.clock": 0.2586, "Acc.flag": 0.4091}

此外,我尝试了新版本bra_nchw.py,但我只得到了大约 31% mIoU 的较低性能。

对不起,我做错了什么吗?

Hello, I am also trying to run this task with dual cards. Besides using the script you wrote, do I need to change other codes? I have tried several times without success, and I really hope to get your help.

taoxingwang commented 9 months ago

非常感谢!我会尝试。

感谢您的工作! 我在分割部分运行了脚本,但我无法在纸上得到结果。这是我的脚本:

MODEL=upernet.biformer_small
OUTPUT_DIR=/home/h3c/workspace/results/biformer/seg

CONFIG_DIR=configs/ade20k
CONFIG=${CONFIG_DIR}/${MODEL}.py

NOW=$(date '+%m-%d-%H:%M:%S')
WORK_DIR=${OUTPUT_DIR}/${MODEL}/${NOW}
CKPT=/home/h3c/workspace/codes/BiFormer/biformer_small_best.pth

python -m torch.distributed.launch --nproc_per_node=2 --master_port=25643 train.py ${CONFIG} \
            --launcher="pytorch" \
            --work-dir=${WORK_DIR} \
            --options model.pretrained=${CKPT} \

我只是使用你在分类部分发布的检查点并遵循中的所有参数/BiFormer/semantic_segmentation/configs/ade20k/upernet.biformer_small.py 经过160K iter的训练,得到了45.32%的mIoU

{"mode": "val", "epoch": 32, "iter": 1000, "lr": 0.0, "aAcc": 0.8157, "mIoU": 0.4532, "mAcc": 0.6129, "IoU.wall": 0.7498, "IoU.building": 0.8148, "IoU.sky": 0.9405, "IoU.floor": 0.8119, "IoU.tree": 0.7525, "IoU.ceiling": 0.8209, "IoU.road": 0.8311, "IoU.bed ": 0.8721, "IoU.windowpane": 0.6067, "IoU.grass": 0.689, "IoU.cabinet": 0.572, "IoU.sidewalk": 0.6193, "IoU.person": 0.775, "IoU.earth": 0.3497, "IoU.door": 0.4682, "IoU.table": 0.5372, "IoU.mountain": 0.5628, "IoU.plant": 0.5036, "IoU.curtain": 0.7305, "IoU.chair": 0.5011, "IoU.car": 0.8192, "IoU.water": 0.5351, "IoU.painting": 0.6741, "IoU.sofa": 0.5771, "IoU.shelf": 0.3926, "IoU.house": 0.4642, "IoU.sea": 0.6092, "IoU.mirror": 0.6144, "IoU.rug": 0.6618, "IoU.field": 0.3732, "IoU.armchair": 0.34, "IoU.seat": 0.6288, "IoU.fence": 0.4776, "IoU.desk": 0.4634, "IoU.rock": 0.4338, "IoU.wardrobe": 0.4775, "IoU.lamp": 0.5535, "IoU.bathtub": 0.6855, "IoU.railing": 0.3617, "IoU.cushion": 0.5055, "IoU.base": 0.3135, "IoU.box": 0.1889, "IoU.column": 0.4427, "IoU.signboard": 0.3714, "IoU.chest of drawers": 0.3435, "IoU.counter": 0.3965, "IoU.sand": 0.4167, "IoU.sink": 0.6428, "IoU.skyscraper": 0.4852, "IoU.fireplace": 0.6056, "IoU.refrigerator": 0.6387, "IoU.grandstand": 0.382, "IoU.path": 0.2026, "IoU.stairs": 0.3024, "IoU.runway": 0.6852, "IoU.case": 0.6331, "IoU.pool table": 0.9035, "IoU.pillow": 0.5455, "IoU.screen door": 0.5381, "IoU.stairway": 0.3905, "IoU.river": 0.1623, "IoU.bridge": 0.5883, "IoU.bookcase": 0.3064, "IoU.blind": 0.4062, "IoU.coffee table": 0.4865, "IoU.toilet": 0.73, "IoU.flower": 0.362, "IoU.book": 0.4247, "IoU.hill": 0.1346, "IoU.bench": 0.3971, "IoU.countertop": 0.4909, "IoU.stove": 0.6121, "IoU.palm": 0.4961, "IoU.kitchen island": 0.3359, "IoU.computer": 0.5765, "IoU.swivel chair": 0.4285, "IoU.boat": 0.3019, "IoU.bar": 0.4825, "IoU.arcade machine": 0.6025, "IoU.hovel": 0.298, "IoU.bus": 0.799, "IoU.towel": 0.6117, "IoU.light": 0.4729, "IoU.truck": 0.2551, "IoU.tower": 0.2966, "IoU.chandelier": 0.6189, "IoU.awning": 0.3284, "IoU.streetlight": 0.2013, "IoU.booth": 0.3303, "IoU.television receiver": 0.6494, "IoU.airplane": 0.5304, "IoU.dirt track": 0.112, "IoU.apparel": 0.3022, "IoU.pole": 0.1561, "IoU.land": 0.0165, "IoU.bannister": 0.0477, "IoU.escalator": 0.4338, "IoU.ottoman": 0.4951, "IoU.bottle": 0.1214, "IoU.buffet": 0.4683, "IoU.poster": 0.137, "IoU.stage": 0.1453, "IoU.van": 0.4185, "IoU.ship": 0.5525, "IoU.fountain": 0.243, "IoU.conveyer belt": 0.535, "IoU.canopy": 0.1664, "IoU.washer": 0.6119, "IoU.plaything": 0.2774, "IoU.swimming pool": 0.5712, "IoU.stool": 0.3033, "IoU.barrel": 0.379, "IoU.basket": 0.3221, "IoU.waterfall": 0.7458, "IoU.tent": 0.7565, "IoU.bag": 0.0769, "IoU.minibike": 0.6268, "IoU.cradle": 0.5708, "IoU.oven": 0.3523, "IoU.ball": 0.4085, "IoU.food": 0.4589, "IoU.step": 0.0194, "IoU.tank": 0.494, "IoU.trade name": 0.2347, "IoU.microwave": 0.7802, "IoU.pot": 0.3467, "IoU.animal": 0.5789, "IoU.bicycle": 0.5363, "IoU.lake": 0.5452, "IoU.dishwasher": 0.4162, "IoU.screen": 0.519, "IoU.blanket": 0.0402, "IoU.sculpture": 0.4434, "IoU.hood": 0.5812, "IoU.sconce": 0.2392, "IoU.vase": 0.2684, "IoU.traffic light": 0.1992, "IoU.tray": 0.0305, "IoU.ashcan": 0.3684, "IoU.fan": 0.5163, "IoU.pier": 0.3581, "IoU.crt screen": 0.0402, "IoU.plate": 0.5139, "IoU.monitor": 0.0864, "IoU.bulletin board": 0.4406, "IoU.shower": 0.0077, "IoU.radiator": 0.5858, "IoU.glass": 0.0791, "IoU.clock": 0.2303, "IoU.flag": 0.3673, "Acc.wall": 0.8514, "Acc.building": 0.9065, "Acc.sky": 0.9687, "Acc.floor": 0.8836, "Acc.tree": 0.8716, "Acc.ceiling": 0.8823, "Acc.road": 0.8934, "Acc.bed ": 0.9423, "Acc.windowpane": 0.7647, "Acc.grass": 0.8592, "Acc.cabinet": 0.6884, "Acc.sidewalk": 0.7713, "Acc.person": 0.8835, "Acc.earth": 0.47, "Acc.door": 0.6218, "Acc.table": 0.693, "Acc.mountain": 0.7681, "Acc.plant": 0.623, "Acc.curtain": 0.8565, "Acc.chair": 0.6319, "Acc.car": 0.9061, "Acc.water": 0.6655, "Acc.painting": 0.8565, "Acc.sofa": 0.7563, "Acc.shelf": 0.5809, "Acc.house": 0.7459, "Acc.sea": 0.8515, "Acc.mirror": 0.7218, "Acc.rug": 0.7969, "Acc.field": 0.5453, "Acc.armchair": 0.5544, "Acc.seat": 0.8609, "Acc.fence": 0.6484, "Acc.desk": 0.7283, "Acc.rock": 0.6883, "Acc.wardrobe": 0.7032, "Acc.lamp": 0.7083, "Acc.bathtub": 0.8115, "Acc.railing": 0.4746, "Acc.cushion": 0.6132, "Acc.base": 0.5948, "Acc.box": 0.2305, "Acc.column": 0.6038, "Acc.signboard": 0.4677, "Acc.chest of drawers": 0.5021, "Acc.counter": 0.4562, "Acc.sand": 0.588, "Acc.sink": 0.7237, "Acc.skyscraper": 0.6147, "Acc.fireplace": 0.8795, "Acc.refrigerator": 0.8517, "Acc.grandstand": 0.8288, "Acc.path": 0.3338, "Acc.stairs": 0.3531, "Acc.runway": 0.954, "Acc.case": 0.8407, "Acc.pool table": 0.9591, "Acc.pillow": 0.7043, "Acc.screen door": 0.8156, "Acc.stairway": 0.4694, "Acc.river": 0.3618, "Acc.bridge": 0.8505, "Acc.bookcase": 0.5925, "Acc.blind": 0.4818, "Acc.coffee table": 0.8091, "Acc.toilet": 0.9159, "Acc.flower": 0.5195, "Acc.book": 0.6065, "Acc.hill": 0.219, "Acc.bench": 0.5155, "Acc.countertop": 0.6636, "Acc.stove": 0.7709, "Acc.palm": 0.7272, "Acc.kitchen island": 0.8012, "Acc.computer": 0.7625, "Acc.swivel chair": 0.7474, "Acc.boat": 0.5022, "Acc.bar": 0.6881, "Acc.arcade machine": 0.8357, "Acc.hovel": 0.4787, "Acc.bus": 0.9661, "Acc.towel": 0.7556, "Acc.light": 0.5349, "Acc.truck": 0.4912, "Acc.tower": 0.6598, "Acc.chandelier": 0.8069, "Acc.awning": 0.4226, "Acc.streetlight": 0.2572, "Acc.booth": 0.6564, "Acc.television receiver": 0.8086, "Acc.airplane": 0.704, "Acc.dirt track": 0.3559, "Acc.apparel": 0.3625, "Acc.pole": 0.1917, "Acc.land": 0.0255, "Acc.bannister": 0.0705, "Acc.escalator": 0.8254, "Acc.ottoman": 0.5913, "Acc.bottle": 0.1328, "Acc.buffet": 0.6984, "Acc.poster": 0.1911, "Acc.stage": 0.452, "Acc.van": 0.5686, "Acc.ship": 0.9553, "Acc.fountain": 0.2597, "Acc.conveyer belt": 0.9528, "Acc.canopy": 0.3348, "Acc.washer": 0.7959, "Acc.plaything": 0.5114, "Acc.swimming pool": 0.835, "Acc.stool": 0.4093, "Acc.barrel": 0.6512, "Acc.basket": 0.3959, "Acc.waterfall": 0.9322, "Acc.tent": 0.9926, "Acc.bag": 0.0848, "Acc.minibike": 0.8096, "Acc.cradle": 0.8412, "Acc.oven": 0.5692, "Acc.ball": 0.6886, "Acc.food": 0.5119, "Acc.step": 0.0243, "Acc.tank": 0.6731, "Acc.trade name": 0.258, "Acc.microwave": 0.9172, "Acc.pot": 0.4097, "Acc.animal": 0.6256, "Acc.bicycle": 0.7739, "Acc.lake": 0.6362, "Acc.dishwasher": 0.5984, "Acc.screen": 0.8872, "Acc.blanket": 0.0459, "Acc.sculpture": 0.6051, "Acc.hood": 0.656, "Acc.sconce": 0.2872, "Acc.vase": 0.3981, "Acc.traffic light": 0.4289, "Acc.tray": 0.0337, "Acc.ashcan": 0.5113, "Acc.fan": 0.7614, "Acc.pier": 0.7415, "Acc.crt screen": 0.1154, "Acc.plate": 0.6714, "Acc.monitor": 0.1304, "Acc.bulletin board": 0.5742, "Acc.shower": 0.0081, "Acc.radiator": 0.6818, "Acc.glass": 0.0807, "Acc.clock": 0.2586, "Acc.flag": 0.4091}

此外,我尝试了新版本,但我只得到了大约 31% mIoU 的较低性能。bra_nchw.py 对不起,我做错了什么吗?

您好,我也在尝试使用双卡运行此任务。除了使用您编写的脚本之外,我还需要更改其他代码吗?我尝试了几次都没有成功,我真的希望得到你的帮助。

您好请问您现在已经解决了这个问题了吗?