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

Running on a data without test labels #70

Closed
absagargupta opened this issue Mar 1, 2019 · 4 comments
Closed

Running on a data without test labels #70

absagargupta opened this issue Mar 1, 2019 · 4 comments

Comments

@absagargupta
Copy link

Hello there

Suppose I have trained my model on a dataset having the images as well as masks in the training as well as test set (Cityscape dataset). Is it possible that after training it on the (cityscape) dataset, I run it for creating masks of MSMT17_V2 image dataset? If yes what all changes should I do? Thank you well in advance for the reply :-)

@qubvel
Copy link
Owner

qubvel commented Mar 1, 2019

Hi, @absagargupta
You can make prediction on any images/any dataset (make sure to preprocess them same as in training stage), but model will produce label it have been trained on.

@absagargupta
Copy link
Author

Thank you so much for the prompt reply. In case I need just the labels of people and the background what changes should I take care of?

@qubvel
Copy link
Owner

qubvel commented Mar 1, 2019

Suppose you have trained you model for C=10 classes, where value 3 is people class.
Output of network will be a tensor output with shape (N, H, W, 10).
To get mask of people class:
mask = (np.argmax(output, axis=-1) == 3)

@absagargupta
Copy link
Author

Thank you. :-)

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

2 participants