Do you like Quick, Draw? Well what if you could train/predict doodles drawn inside Streamlit? Also draws lines, circles and boxes over background images for annotation.
first of all, thank you for this awesome extension to streamlit. I'd really like to make use of the "initial_drawing" capability in order to superimpose bounding boxes on images. However, there seems to be a bug that the background image overlays the drawing (while it should be the other way around). The drawing only appears in the following cases:
press "undo". This will prompt the app to show the initial drawing on top of the background image - this is what I want, but it should be like that in the first place without having to press "undo"
press "Reset Canvas & History". This will show the initial drawing, but remove the image
My super simple app is as follows:
import json
from pathlib import Path
import streamlit as st
from PIL import Image
from streamlit_drawable_canvas import st_canvas
with open("star_state.json", "r") as f:
star_state = json.load(f)
canvas_result = st_canvas(
fill_color="rgba(255, 165, 0, 0.3)",
background_image=Image.open("img/tennis-balls.jpg"),
update_streamlit=False,
height=150,
initial_drawing=star_state,
key="full_app",
)
star_state.json and tennis-balls.jpg are from the demo repo.
EDIT: @mroyce1 I've released version 0.7.0, could you update and try on your side and tell me if all goes well? I've edited the demo app to test loading a state on the Get center coords of circles demo.
Hi,
first of all, thank you for this awesome extension to streamlit. I'd really like to make use of the "initial_drawing" capability in order to superimpose bounding boxes on images. However, there seems to be a bug that the background image overlays the drawing (while it should be the other way around). The drawing only appears in the following cases:
My super simple app is as follows:
star_state.json
andtennis-balls.jpg
are from the demo repo.Thank you for your help.