Giter Site home page Giter Site logo

Comments (16)

JayeShen1996 avatar JayeShen1996 commented on July 29, 2024 2

Hello, maybe my expression is not clear. My data set is divided into training set, validation set and test set. I input the training and validation set into the model for training and validation. Now I want to see the results of my model on the test set. What should I do? In addition, my data was renamed according to VOC rules.

I see. May I ask what is your current respective val-test accuracies?

My verification set MIou is over 58 and the test set is not implemented yet.

from dst-cbc.

JayeShen1996 avatar JayeShen1996 commented on July 29, 2024 1

I use semantic segmentation code. Is the code you mentioned directly added to the existing.sh file, or is it a separate sh file for testing?

FYI, it is not an existing.sh. You can just run python main.py --state=3 --continue-from=<pt file> <other args you may need> in commandline.

Thank you. I'll keep trying.

from dst-cbc.

JayeShen1996 avatar JayeShen1996 commented on July 29, 2024 1

Hello. According to your guidance, I tested the Validation set, and the results are as follows.

Results of validation set in training:
average row correct: ['99.60', '54.81']
IoU: ['95.86', '52.38']
mean IoU: 74.12
Epoch time: 112.59s

The code used for validation
python main.py --state=3 --train-set=2 --sets-id=1 --mixed-precision --continue-from=dmt-voc-20-5--i.pt --coco --mixed-precision

Results of validation
average row correct: ['100.00', '0.00']
IoU: ['96.63', '0.00']
mean IoU: 48.31

And I used the code of pseudo labels to generate .npy files for the weight of deeplabv2 network. The classification results are "0".I'm very upset. Do you know what's wrong? Thank you for your reply.

from dst-cbc.

JayeShen1996 avatar JayeShen1996 commented on July 29, 2024 1

@JayeShen1996 In DMT default setting we use 2 models start from imagenet (-i) and coco (-c) weights respectively. They have different input scale and RGB channel order to match the respective pre-trained weights. So if you use --coco for a imagenet initiated model, it will fail, since it was trained without --coco.

Now I understand. Thank you for your reply. Good luck.

from dst-cbc.

voldemortX avatar voldemortX commented on July 29, 2024

@JayeShen1996 Hi! Are you conducting visualization of trained models, or testing on a standalone test set to obtain miou? If you mean testing like other datasets such as VOC, the training itself should include validation?

from dst-cbc.

JayeShen1996 avatar JayeShen1996 commented on July 29, 2024

Hello, maybe my expression is not clear. My data set is divided into training set, validation set and test set. I input the training and validation set into the model for training and validation. Now I want to see the results of my model on the test set. What should I do? In addition, my data was renamed according to VOC rules.

from dst-cbc.

voldemortX avatar voldemortX commented on July 29, 2024

Hello, maybe my expression is not clear. My data set is divided into training set, validation set and test set. I input the training and validation set into the model for training and validation. Now I want to see the results of my model on the test set. What should I do? In addition, my data was renamed according to VOC rules.

I see. May I ask what is your current respective val-test accuracies?

from dst-cbc.

voldemortX avatar voldemortX commented on July 29, 2024

You can try --state=3 --continue-from=weight file and modify the dataset class to load your test set. Other things should be same as validation and do not need changing.

from dst-cbc.

JayeShen1996 avatar JayeShen1996 commented on July 29, 2024

You can try --state=3 --continue-from=weight file and modify the dataset class to load your test set. Other things should be same as validation and do not need changing.

I use semantic segmentation code. Is the code you mentioned directly added to the existing.sh file, or is it a separate sh file for testing?

from dst-cbc.

JayeShen1996 avatar JayeShen1996 commented on July 29, 2024

Thank you for your reply. Another problem that bothered me was how to visualize the results of the validation set in PNG or other image data format. If this is possible, I divide the data into training sets and validation sets.

from dst-cbc.

voldemortX avatar voldemortX commented on July 29, 2024

@JayeShen1996 For modifying the dataset class, you can modify this function to get image & mask lists.

For visualizations, I have some new visualization techniques implemented in https://github.com/voldemortX/pytorch-auto-drive/blob/master/tools/vis_tools.py and https://github.com/voldemortX/pytorch-auto-drive/blob/master/visualize_segmentation.py that is recommended for reference. However, that repo currently do not support visualization of the PASCAL VOC dataset structure. You can try combine the vis funcs there and the dataset classes here to visualize the validation set results.

from dst-cbc.

voldemortX avatar voldemortX commented on July 29, 2024

I use semantic segmentation code. Is the code you mentioned directly added to the existing.sh file, or is it a separate sh file for testing?

FYI, it is not an existing.sh. You can just run python main.py --state=3 --continue-from=<pt file> <other args you may need> in commandline.

from dst-cbc.

voldemortX avatar voldemortX commented on July 29, 2024

Hello. According to your guidance, I tested the Validation set, and the results are as follows.

Results of validation set in training:
average row correct: ['99.60', '54.81']
IoU: ['95.86', '52.38']
mean IoU: 74.12
Epoch time: 112.59s

The code used for validation
python main.py --state=3 --train-set=2 --sets-id=1 --mixed-precision --continue-from=dmt-voc-20-5--i.pt --coco --mixed-precision

Results of validation
average row correct: ['100.00', '0.00']
IoU: ['96.63', '0.00']
mean IoU: 48.31

And I used the code of pseudo labels to generate .npy files for the weight of deeplabv2 network. The classification results are "0".I'm very upset. Do you know what's wrong? Thank you for your reply.

Are you using a imagenet pre-trained model? In that case you may need to remove --coco

from dst-cbc.

JayeShen1996 avatar JayeShen1996 commented on July 29, 2024

I seem to know the source of the problem. It should be the issue of pre-trained weight. When I do not load the pre-trained weight, there can be some results, and when I load, the results are all background. In addition, I did use "convert_coco_resnet101.py" to set up the pre-trained weight.

Hello. According to your guidance, I tested the Validation set, and the results are as follows.
Results of validation set in training:
average row correct: ['99.60', '54.81']
IoU: ['95.86', '52.38']
mean IoU: 74.12
Epoch time: 112.59s
The code used for validation
python main.py --state=3 --train-set=2 --sets-id=1 --mixed-precision --continue-from=dmt-voc-20-5--i.pt --coco --mixed-precision
Results of validation
average row correct: ['100.00', '0.00']
IoU: ['96.63', '0.00']
mean IoU: 48.31
And I used the code of pseudo labels to generate .npy files for the weight of deepl

Hello. According to your guidance, I tested the Validation set, and the results are as follows.
Results of validation set in training:
average row correct: ['99.60', '54.81']
IoU: ['95.86', '52.38']
mean IoU: 74.12
Epoch time: 112.59s
The code used for validation
python main.py --state=3 --train-set=2 --sets-id=1 --mixed-precision --continue-from=dmt-voc-20-5--i.pt --coco --mixed-precision
Results of validation
average row correct: ['100.00', '0.00']
IoU: ['96.63', '0.00']
mean IoU: 48.31
And I used the code of pseudo labels to generate .npy files for the weight of deeplabv2 network. The classification results are "0".I'm very upset. Do you know what's wrong? Thank you for your reply.

Are you using a imagenet pre-trained model? In that case you may need to remove --coco

I seem to know the source of the problem. It should be the issue of pre-trained weight. When I do not load the pre-trained weight, there can be some results, and when I load, the results are all background. In addition, I did use "convert_coco_resnet101.py" to set up the pre-trained weight.

from dst-cbc.

voldemortX avatar voldemortX commented on July 29, 2024

@JayeShen1996 In DMT default setting we use 2 models start from imagenet (-i) and coco (-c) weights respectively. They have different input scale and RGB channel order to match the respective pre-trained weights. So if you use --coco for a imagenet initiated model, it will fail, since it was trained without --coco.

from dst-cbc.

voldemortX avatar voldemortX commented on July 29, 2024

It seems this issue is resolved, I'll close for now. Feel free to reopen.

from dst-cbc.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.