Coder Social home page Coder Social logo

Comments (10)

256-7421142 avatar 256-7421142 commented on June 26, 2024

qt_table.pk DocTamperV1-FCD_75.pk... What is the purpose of these files, how are they generated, and how do you pick the right quantisation table?

from doctamper.

qcf-568 avatar qcf-568 commented on June 26, 2024

The purpose of them is to record the random selected compression factors for a fair comparison, it can also be seen as keeping the random seed same all the test time. We pick the right quant-table by choosing a compress factor then get the corresponding standard quant-table from OpenCV.

from doctamper.

256-7421142 avatar 256-7421142 commented on June 26, 2024

The purpose of them is to record the random selected compression factors for a fair comparison, it can also be seen as keeping the random seed same all the test time. We pick the right quant-table by choosing a compress factor then get the corresponding standard quant-table from OpenCV.

Can you elaborate on how the corresponding quant_table is generated based on Curriculum learning (CL) during training, or can you provide the pk file of the trained quant_table, I don't know how to generate the corresponding pk file using OpenCV.

from doctamper.

qcf-568 avatar qcf-568 commented on June 26, 2024

I didn't use any .pk file to conduct CL, the compression factors are randomly and dynamically generated in the dataset class. I am forbidden to show the actual codes publicly now.

from doctamper.

qcf-568 avatar qcf-568 commented on June 26, 2024

The training process doesn't need such .pk file (e.g. xxx_75.pk xxx_90.pk), some of the codes of the dataset class need to be adjusted before training stage.

from doctamper.

256-7421142 avatar 256-7421142 commented on June 26, 2024
        record = self.record[index]
        choicei = len(record)-1
        q = int(record[-1]) 
        use_qtb = self.pks[q]
        if choicei>1:
            q2 = int(record[-3])
            use_qtb2 = self.pks[q2]
        if choicei>0:
            q1 = int(record[-2])
            use_qtb1 = self.pks[q1]

Why is the length of the record inconsistent?

from doctamper.

256-7421142 avatar 256-7421142 commented on June 26, 2024

The purpose of them is to record the random selected compression factors for a fair comparison, it can also be seen as keeping the random seed same all the test time. We pick the right quant-table by choosing a compress factor then get the corresponding standard quant-table from OpenCV.

record = self.record[index]
    choicei = len(record)-1
    q = int(record[-1]) 
    use_qtb = self.pks[q]
    if choicei>1:
        q2 = int(record[-3])
        use_qtb2 = self.pks[q2]
    if choicei>0:
        q1 = int(record[-2])
        use_qtb1 = self.pks[q1]

Why is the length of the record inconsistent?

from doctamper.

qcf-568 avatar qcf-568 commented on June 26, 2024

This part of codes is to choice the times (1,2 or 3) for image compression. Sometimes images are compressed more than once. The times for compression are randomly generated before being recorded.

from doctamper.

256-7421142 avatar 256-7421142 commented on June 26, 2024

The purpose of them is to record the random selected compression factors for a fair comparison, it can also be seen as keeping the random seed same all the test time. We pick the right quant-table by choosing a compress factor then get the corresponding standard quant-table from OpenCV.

How is the quantised table generated during training, the range of values in the quantised table is in 0-63?When I am reproducing the CL training strategy, the quantised table generated based on qtable = jpg.quant_tables[0] exceeds this range, and the input to self.qtembed = nn.Embedding(64,16) gives error RuntimeError: CUDA error: device-side assert triggered

from doctamper.

qcf-568 avatar qcf-568 commented on June 26, 2024

Yes, the range of values is forced to be limited to 0-63.

from doctamper.

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.