Giter Site home page Giter Site logo

Comments (4)

LiheYoung avatar LiheYoung commented on September 24, 2024 3

@tanveer6715 Add a condition:

if self.mode == 'train_u':
    mask = Image.fromarray(np.zeros((img.size[1], img.size[0]), dtype=np.uint8))
else:
    mask = Image.fromarray(np.array(Image.open(os.path.join(self.root, id.split(' ')[1])))) 

from unimatch.

LiheYoung avatar LiheYoung commented on September 24, 2024 1

We do not use manual annotations of unlabeled images for training. The masks of unlabeled images are used to record padded regions during image pre-processing.

If you do not have masks, you can simply duplicate the image paths in each line of split file, for example:
path/of/image1.jpg path/of/image1.jpg

Then you need to modify this line:

mask = Image.fromarray(np.array(Image.open(os.path.join(self.root, id.split(' ')[1]))))
to:

mask = Image.fromarray(np.zeros((img.size[1], img.size[0]), dtype=np.uint8))

from unimatch.

rahulsnkr avatar rahulsnkr commented on September 24, 2024

thanks for the clarification!

from unimatch.

tanveer6715 avatar tanveer6715 commented on September 24, 2024

We do not use manual annotations of unlabeled images for training. The masks of unlabeled images are used to record padded regions during image pre-processing.

If you do not have masks, you can simply duplicate the image paths in each line of split file, for example: path/of/image1.jpg path/of/image1.jpg

Then you need to modify this line:

mask = Image.fromarray(np.array(Image.open(os.path.join(self.root, id.split(' ')[1]))))

to:

mask = Image.fromarray(np.zeros((img.size[1], img.size[0]), dtype=np.uint8))

Hi,
This process the data in the training when we do not want to use labels in the unlabeled data split but in the validation step after each epoch the model shows 0 miou as it do not use masks in the validation step as well to compare the predictions. How to tackle this problem?

from unimatch.

Related Issues (20)

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.