PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

[General Issue] Getting test results for my data

Open Yasminbr opened this issue 3 years ago • 4 comments

Hi,

After I trained my UNET I would like to get the results of Dice, Iou,Kappa etc. for the test data. But unfortunately I can not achieve this. The model is doing validation while training but i want him to check for the test data after all the iterations are finishing. This is my yml file.

`batch_size: 6 iters: 6000 num_workers: 2 train_dataset: type: Dataset dataset_root: /home/ARO.local/yasminbr/Projects/June/ num_classes: 2 train_path: /home/ARO.local/yasminbr/Projects/June/train.txt transforms: - type: Resize target_size: [512, 512] - type: Normalize mean: [0.3644, 0.4067, 0.2521] std: [0.2360, 0.1924, 0.1574] mode: train

val_dataset: type: Dataset dataset_root: /home/ARO.local/yasminbr/Projects/June num_classes: 2 val_path: /home/ARO.local/yasminbr/Projects/June/val.txt

transforms: - type: Resize target_size: [512, 512] - type: Normalize mean: [0.3644, 0.4067, 0.2521] std: [0.2360, 0.1924, 0.1574] mode: val

test_dataset: type: Dataset dataset_root: /home/ARO.local/yasminbr/Projects/June/ num_classes: 2 test_path: /home/ARO.local/yasminbr/Projects/June/test.txt mode: test

optimizer: type: sgd momentum: 0.9 weight_decay: 4.0e-5

lr_scheduler: type: PolynomialDecay learning_rate: 0.001 end_lr: 0 power: 0.2

loss: types: - type: DiceLoss coef: [1] ignore_index: 0

model: type: UNet num_classes: 2 use_deconv: False pretrained: /home/ARO.local/yasminbr/Projects/June/PreTrained/UnetCityPassmodel.pdparams `

Yasminbr avatar Jun 15 '22 11:06 Yasminbr

Normally, the test data do not have labels. Therefore you can not get various metric results on it like kappa, dice and etc. However, you can use predict.py to predict and visualize the images.

shiyutang avatar Jun 16 '22 06:06 shiyutang

so what is the "Test mode" for?

test_dataset: type: Dataset dataset_root: /home/ARO.local/yasminbr/Projects/June/ num_classes: 2 test_path: /home/ARO.local/yasminbr/Projects/June/test.txt mode: test

Yasminbr avatar Jun 16 '22 07:06 Yasminbr

Test dataset is used to test the performance of your model, see how it react on data it never sees.

shiyutang avatar Jun 22 '22 08:06 shiyutang

Test dataset is used to test the performance of your model, see how it react on data it never sees.

I know the meaning of the test data but when running this command I don't get any feedback from the net.

Yasminbr avatar Jun 22 '22 08:06 Yasminbr

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 09 '22 17:12 github-actions[bot]

If you are evaluating with multiple GPUs, the result will be produced after some time without any other information. You can see the GPU is occupied but there is no other information. Please wait patiently for the result to come back.

shiyutang avatar Dec 12 '22 02:12 shiyutang

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 11 '23 17:02 github-actions[bot]