Spaces:
Sleeping
Sleeping
File size: 2,222 Bytes
07cf2eb b913503 07cf2eb b913503 07cf2eb b913503 07cf2eb a972e32 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import streamlit as st
def make_inpainting_explanation():
with st.expander("Explanation inpainting", expanded=False):
st.write("In the inpainting mode, you can draw regions on the input image that you want to regenerate. "
"This can be useful to remove unwanted objects from the image or to improve the consistency of the image."
)
st.image("content/inpainting_sidebar.png", caption="Image before inpainting, note the ornaments on the wall", width=500)
st.write("You can find drawing options in the sidebar. There are two modes: freedraw and polygon. Freedraw allows the user to draw with a pencil of a certain width. "
"Polygon allows the user to draw a polygon by clicking on the image to add a point. The polygon is closed by right clicking.")
st.write("### Example inpainting")
st.write("In the example below, the ornaments on the wall are removed. The inpainting is done by drawing a mask on the image.")
st.image("content/inpainting_before.jpg", caption="Image before inpainting, note the ornaments on the wall")
st.image("content/inpainting_after.png", caption="Image before inpainting, note the ornaments on the wall")
def make_regeneration_explanation():
with st.expander("Explanation object regeneration"):
st.write("In this object regeneration mode, the model calculates which objects occur in the image. "
"The user can then select which objects can be regenerated by the controlnet model by adding them in the multiselect box. "
"All the object classes that are not selected will remain the same as in the original image."
)
st.write("### Example object regeneration")
st.write("In the example below, the room consists of various objects such as wall, ceiling, floor, lamp, bed, ... "
"In the multiselect box, all the objects except for 'lamp', 'bed and 'table' are selected to be regenerated. "
)
st.image("content/regen_example.png", caption="Room where all concepts except for 'bed', 'lamp', 'table' are regenerated")
def make_segmentation_explanation():
pass
|