Giter VIP home page Giter VIP logo

Comments (7)

cohen-rachel avatar cohen-rachel commented on August 23, 2024 1

I solved it.
I just deleted and reinstalled Python and the image-tools (I noticed there was a new version on github) and it is now working with Python with pillow.

It still has an issue reading the image in Matlab (using both the GUI and using python to export)

from image-tools.

mbeissinger avatar mbeissinger commented on August 23, 2024 1

@berbschloe should be fixed now! Saving the images with Pillow using their existing file format vs using the shutil.copy and adding the .jpg

from image-tools.

mbeissinger avatar mbeissinger commented on August 23, 2024

The export dataset from lobe function is using shutil.copyfile from our stored blob, and making it a jpg (https://github.com/lobe/image-tools/blob/master/dataset/export_from_lobe.py#L103). What were your original file types?

Are you using Python from a virtual environment? I'd highly recommend it to make sure everything is clean (https://docs.python.org/3/tutorial/venv.html). You shouldn't have to run anything here as administrator. Were you running Lobe as admin?

from image-tools.

mbeissinger avatar mbeissinger commented on August 23, 2024

@rachelc8997 can you try doing the export from the GUI app rather than running from the command line? Are you able to open the exported image files then?

from image-tools.

berbschloe avatar berbschloe commented on August 23, 2024

I think the images from the Lobe app are getting exported as WEBPs even though the file extension is '.jpg'?
Looking at the file info in the Preview App on Mac, you can see the document type.

Screen Shot 2021-02-12 at 2 37 13 PM

Also, I get a encoding error when trying to decode the image file into a tensor in nodejs.
Expected image (JPEG, PNG, or GIF), got unknown format starting with 'RIFF\330j\000\000WEBPVP8X

Right now I'm getting success decoding file as a WEBP in node.

from image-tools.

mbeissinger avatar mbeissinger commented on August 23, 2024

Interesting, is that image originally WebP? I should probably make it check (we strip the extension) instead of just making it jpg.

from image-tools.

berbschloe avatar berbschloe commented on August 23, 2024

The image was taken via the web camera from in Lobe application (Mac).

NOTES:
The image above was from the python export flow.
The same image located in ~/Library/Application Support/Lobe/Projects/xyz/data/blobs is also a WebP.
Just like you mentioned above, the file extension is stripped pre python export.

from image-tools.

Related Issues (7)

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.