Git Product home page Git Product logo

Comments (5)

bo-zhang-cs avatar bo-zhang-cs commented on June 26, 2024

(1) The released code has been validated and did not raise any errors. (2) The provided information is unable to pinpoint the error. It is suggested to run the code step by step to identify the bug.

from libcom.

sd707589 avatar sd707589 commented on June 26, 2024

(1) The released code has been validated and did not raise any errors. (2) The provided information is unable to pinpoint the error. It is suggested to run the code step by step to identify the bug.

During debugging, I found the error raised from './libcom/image_harmonization/source/functions.py' line 489

class TrilinearInterpolationFunction(torch.autograd.Function):
    @staticmethod
    def forward(ctx, lut, x):
        x = x.contiguous()

        output = x.new(x.size())
        dim = lut.size()[-1]
        shift = dim ** 3
        binsize = 1.000001 / (dim-1)
        W = x.size(2)
        H = x.size(3)
        # batch = x.size(0)
        batch = x.size(1)
        
        assert 1 == trilinear.forward(lut, 
                                      x, 
                                      output,
                                      dim, 
                                      shift, 
                                      binsize, 
                                      W, 
                                      H, 
                                      batch)  # <======= Bug came from here

        int_package = torch.IntTensor([dim, shift, W, H, batch])

I followed the solution from HuiZeng/Image-Adaptive-3DLUT#70 , but still no work.
Still needing your help!

from libcom.

bo-zhang-cs avatar bo-zhang-cs commented on June 26, 2024

If your PyTorch version is not 1.10.1, please try installing this specific version of PyTorch and then reinstall the libcom library by running python setup.py install.

from libcom.

sd707589 avatar sd707589 commented on June 26, 2024

If your PyTorch version is not 1.10.1, please try installing this specific version of PyTorch and then reinstall the libcom library by running python setup.py install.

Thx for reply. I did exactly follow the installation instruction . And the "torch-related" libraries are:

open-clip-torch           2.7.0
pytorch-lightning         1.9.0
torch                     1.10.1
torchaudio                0.10.1
torchmetrics              1.3.0.post0
torchvision               0.11.2

But still no work.

from libcom.

bo-zhang-cs avatar bo-zhang-cs commented on June 26, 2024

The latest code has fixed the trilinear bugs for PyTorch version 1.11.0 or later. Please consider upgrading PyTorch and rebuilding the library. Hope this can help you. Alternatively, you can try the source code for image harmonization, the link to which is provided in our documentation.

from libcom.

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.