Git Product home page Git Product logo

Comments (10)

Jianghanxiao avatar Jianghanxiao commented on July 19, 2024 5

Based on above comments, I also find that this case happens when some images have no gt. Below is my modification, which can somehow reduce the influence. It can still use jit most of the time and don't need to modify the dataset.
image

from mask2former.

ShijieVVu avatar ShijieVVu commented on July 19, 2024 3

I created a new running environment for mask2former according to the steps. When I train the COCO dataset, I can train normally, but when I train my dataset, I encounter the following problems.

2021-12-09 11-50-45 的屏幕截图

I've been looking for a solution on Google for a long time, so I'd like to ask if you have any similar problems. Thank you very much for your reply.

If your custom training set includes zero annotation images, this error would show up.

from mask2former.

bowenc0221 avatar bowenc0221 commented on July 19, 2024 1

Does it work if you use batch_dice_loss instead of batch_dice_loss_jit?

from mask2former.

YellowPig-zp avatar YellowPig-zp commented on July 19, 2024 1

Just to add to the comments with my personal experience regarding the issue. Seems like even if your data doesn't contain empty annotations, the codes would still throw out the same bug(I manually removed all the images/annotations for ade20k that do not have labels and encountered the same bug).

Seems like it also has something to do with the pytorch version. For v1.10 the bug appears, but when I down-grade to 1.9.1, it runs like a charm, and the training time is reduced for a few hours.

Hope this could help!

from mask2former.

xiehousen avatar xiehousen commented on July 19, 2024

if I use batch_dice_loss, that's worked.

from mask2former.

haotian-liu avatar haotian-liu commented on July 19, 2024

Hi @bowenc0221, I met the same issue when training the model on YouTube-VIS dataset (with official code). Do we need to turn JIT off or is there some way to fix this RuntimeError issue? Thanks!

from mask2former.

bowenc0221 avatar bowenc0221 commented on July 19, 2024

Hi @bowenc0221, I met the same issue when training the model on YouTube-VIS dataset (with official code). Do we need to turn JIT off or is there some way to fix this RuntimeError issue? Thanks!

I have never met this error. I think it is not necessary to use the JIT version of the loss function, so turning it off is the simplest solution. If you really want to fix this error, I would suggest posting it to the PyTorch team for help.

from mask2former.

haotian-liu avatar haotian-liu commented on July 19, 2024

Hi @bowenc0221, I met the same issue when training the model on YouTube-VIS dataset (with official code). Do we need to turn JIT off or is there some way to fix this RuntimeError issue? Thanks!

I have never met this error. I think it is not necessary to use the JIT version of the loss function, so turning it off is the simplest solution. If you really want to fix this error, I would suggest posting it to the PyTorch team for help.

Thank you!

from mask2former.

xiehousen avatar xiehousen commented on July 19, 2024

Hi @bowenc0221, I met the same issue when training the model on YouTube-VIS dataset (with official code). Do we need to turn JIT off or is there some way to fix this RuntimeError issue? Thanks!

I have never met this error. I think it is not necessary to use the JIT version of the loss function, so turning it off is the simplest solution. If you really want to fix this error, I would suggest posting it to the PyTorch team for help.

Thank you!

I did not use the JIT version, and the The training speed becomes very slow. Do you have this question?

from mask2former.

deeptig84 avatar deeptig84 commented on July 19, 2024

Hi @bowenc0221 bowenc0221

I would like to know how to turn off the batch_dice_loss , is it a config change in the Mask2Former , or I need to go and change the code itself? For Now, I have made changes in the matcher.py file and changed the code to call batch_dice_loss in place of batch_dice_loss_jit. same replacement I have done for batch_sigmoid_ce_loss_jit as well. I wanted to validate the changes with you. My training ran fine after these changes.

from mask2former.

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.