Giter Club home page Giter Club logo

Comments (7)

gereleth avatar gereleth commented on June 18, 2024 2

If the image isn't showing using a local file path you can try encoding it as a base64 string. Something along these lines (I copied this over from examples/introduction.ipynb).

from jupyter_bbox_widget import BBoxWidget
import base64

def encode_image(filepath):
    with open(filepath, 'rb') as f:
        image_bytes = f.read()
    encoded = str(base64.b64encode(image_bytes), 'utf-8')
    return "data:image/jpg;base64,"+encoded
    
widget = BBoxWidget(
    image = encode_image('/dbfs/FileStore/fruit.jpg'),
    classes = ['apple', 'orange', 'pear'],
)

from jupyter-bbox-widget.

gereleth avatar gereleth commented on June 18, 2024 1

Hi @aicarras, thanks for confirming!

Maybe I should make this tip more prominent somewhere =).

from jupyter-bbox-widget.

quillaur avatar quillaur commented on June 18, 2024 1

Thx @gereleth , I had this issue with google colab and your trick fixed it nicely !

from jupyter-bbox-widget.

gereleth avatar gereleth commented on June 18, 2024

Hi @radford1,
Did this help with your problem?

from jupyter-bbox-widget.

aicarras avatar aicarras commented on June 18, 2024

Hi @gereleth. I was facing a similar issue to @radford1, but your suggested solution fixed it for me. Thanks!

from jupyter-bbox-widget.

GeorgePearse avatar GeorgePearse commented on June 18, 2024

Hey, thanks a lot for an excellent tool. I also hit the this and this snippet fixed it. Had no idea what to try before that though.

from jupyter-bbox-widget.

pvilas avatar pvilas commented on June 18, 2024

Hi, this solved my google collab issue too!

from jupyter-bbox-widget.

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.