Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance gap with pytorch 0.4.1: mIoU 79.99 #67

Open
Wangzhuoying0716 opened this issue Oct 28, 2019 · 10 comments
Open

performance gap with pytorch 0.4.1: mIoU 79.99 #67

Wangzhuoying0716 opened this issue Oct 28, 2019 · 10 comments

Comments

@Wangzhuoying0716
Copy link

Sorry to bother you! I tried to implement the training process using the seg_hrnet_w48_train_512x1024_sgd_lr1e-2_wd5e-4_bs_12_epoch484.yaml. But it came out that the validation mIoU for single-scale and no-flip is 79.99, almost 1% lower than your result shown(80.9). I wonder if this is normal variation or I did something wrong ?
Here is the training log:
https://pan.baidu.com/s/1utKUVuBEjDBtfgOk7A-5sQ 【passward: jckv】
Thank you!

@Hussainflr
Copy link

Hussainflr commented Nov 2, 2019

Hi, @Wangzhuoying0716 would you mind sharing your training settings,
I have been trying to train it, but it always gets stuck at this point
image

I don't know where I'm doing something wrong.

my training settings:
Pytorch 0.4.1
python 3.7
OpenCV 3.4.2.17
rest is according to requirements.txt

@Wangzhuoying0716
Copy link
Author

@Hussainflr If there is no error message but just gets stuck, I guess it's because the memory is too full to keep on? You can check the memory usage when it is stuck to see whether it's almost full.
As for me, I just used 4xTitan Xp GPU cards and the setting in seg_hrnet_w48_train_512x1024_sgd_lr1e-2_wd5e-4_bs_12_epoch484.yaml.

@Wangzhuoying0716
Copy link
Author

@Hussainflr I also used
Pytorch 0.4.1 and python 3.7

@sunke123
Copy link
Member

@Wangzhuoying0716
Sorry for late reply.
I checked your log. When training on cityscapes, we use the "class balance" in the loss function.
You can change the config and set the class balance as True.

@whiteinblue
Copy link

Hi @sunke123, LOSS.CLASS_BALANCE defined in lib/config/default.py, but is there any place to use it?
and i found, the loss: criterion = CrossEntropy(ignore_label=config.TRAIN.IGNORE_LABEL,
weight=train_dataset.class_weights), use class weighs, which doesn't matter with CLASS_BALANCE param

@sunke123
Copy link
Member

sunke123 commented Jan 9, 2020

@whiteinblue
Class weights are used to train the model on Cityscapes. If you don't want to use it, you can change it in the yaml.

@whiteinblue
Copy link

@sunke123 thank you for your reply, and i confuse, it's where that the param LOSS.CLASS_BALANCE used ?

@XuShoweR
Copy link

Hi, @Wangzhuoying0716 would you mind sharing your training settings,
I have been trying to train it, but it always gets stuck at this point
image

I don't know where I'm doing something wrong.

my training settings:
Pytorch 0.4.1
python 3.7
OpenCV 3.4.2.17
rest is according to requirements.txt

Hello, i met same problem, have you solved it?

@sunke123
Copy link
Member

@whiteinblue Class_balance is used in the loss function.

@purse1996
Copy link

So where that the param LOSS.CLASS_BALANCE used? I read the code, it seems that no matter what is CLASS_BALANCE param, the balance loss is used in the cityscape dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants