streamlit components for image annotation
Project description
Streamlit Image Annotation
Streamlit component for image annotation.
Features
- You can easily launch an image annotation tool using streamlit.
- By customizing the pre- and post-processing, you can achieve your preferred annotation workflow.
- Currently supports classification and detection tasks.
- Simple UI that is easy to navigate.
Install
pip install streamlit-image-annotation
Example Usage
If you want to see other use cases, please check inside the examples folder.
from glob import glob
import pandas as pd
import streamlit as st
from streamlit_image_annotation import classification
label_list = ['deer', 'human', 'dog', 'penguin', 'framingo', 'teddy bear']
image_path_list = glob('image/*.jpg')
if 'result_df' not in st.session_state:
st.session_state['result_df'] = pd.DataFrame.from_dict({'image': image_path_list, 'label': [0]*len(image_path_list)}).copy()
num_page = st.slider('page', 0, len(image_path_list)-1, 0)
label = classification(image_path_list[num_page],
label_list=label_list,
default_label_index=int(st.session_state['result_df'].loc[num_page, 'label']))
if label is not None and label['label'] != st.session_state['result_df'].loc[num_page, 'label']:
st.session_state['result_df'].loc[num_page, 'label'] = label_list.index(label['label'])
st.table(st.session_state['result_df'])
Future Work
- Refactoring of the source code.
- Addition of docs about API.
- Addition of example code.
- Addition of segmentation and point tasks.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for streamlit_image_annotation-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b81de4a0573d7e591ab1dd95c52200fa9325bf52090f3bec39a5eb6e82ccab1 |
|
MD5 | 4c837a175794903f4f1729caf770e92c |
|
BLAKE2b-256 | 75c44746a61fe038d3e9df8af145bff10480fe0b6c7a8cf466dd9cbafaa25325 |
Close
Hashes for streamlit_image_annotation-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b6f596574f228da7bd86a7bf897a0f107c52a6dce2140819b995fb840d49485 |
|
MD5 | 88c3fd1e844228ee8b563391b6242895 |
|
BLAKE2b-256 | ad8793702ace7922293b8df6ee7a85d4b7f5e85bb6bffa2e8cc1a286d3964a37 |