Coder Social home page Coder Social logo

testimage.jpeg missing about escnn HOT 5 OPEN

psteinb avatar psteinb commented on August 22, 2024
testimage.jpeg missing

from escnn.

Comments (5)

Gabri95 avatar Gabri95 commented on August 22, 2024 1

Hi @psteinb

Thanks for pointing this out! Do you have any recommendations on how to deal with this?

I did not want to use a randomly generated image with numpy 1) to ensure consistency over time and 2) to check equivariance on data representing natural images rather than random noise. I also thought it was not a good idea to include images inside the library.

Maybe I will try to use scipy.misc.face() as a testing image

Thanks,
Gabriele

from escnn.

psteinb avatar psteinb commented on August 22, 2024

On this note, I must stress that having code (and data and dependencies) that is mostly used in the test suite in production code, can cause a lot of maintenance harm very quickly. I would advise to make the use of testimage.jpeg optional or come up with a testimage that can quickly be generated through some lines of numpy. At best, the testimage code is moved into the test suite and declared as default or something along these lines.

from escnn.

psteinb avatar psteinb commented on August 22, 2024

It is hard for me to comment, as I don't know the content of testimage.jpeg and what it's purpose is. For such test data, indeed scipy.misc.face or any of the skimage.data entries will do the trick. For the time being, this is the safest option, I think.

But I still feel troubled that this code resides in the main escnn folder. It would be great to refactor the check_equivariance function to an interface like:

def check_equivariance(self, testimage: np.ndarray, atol: float = 0.1, rtol: float = 0.1, assertion: bool = True, verbose: bool = True):

Then in the test folder, you could compose a python module that provides the testimage for example. This would disentangle this more.

from escnn.

Gabri95 avatar Gabri95 commented on August 22, 2024

I see your point!
I have replaced the image with scipy.datasets.face for the moment, but will try to move all the equivariance-check routines in the test folder in a later release (I don't have time to perform this large refactoring in this moment, but will come back to that as soon as possible).

Thanks again for the useful advices and feedback!

Gabriele

from escnn.

chAwater avatar chAwater commented on August 22, 2024

BTW, this file can be found in the e2cnn repo (link).

from escnn.

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.