A Streamlit app for detecting, segmenting and classifying materials inside mostly transparent vessels in images using a fully convolutional neural network. Use case for this paper and inspired by Sagi Eppel's implementation.
The current release of the app allows predictions on single images only. Next releases will include predictions on a video or a directory of images or videos.
Anaconda and Python 3.7+ are required.
- Clone this repo.
- Download the pre-trained PyTorch model from here or here.
- Extract the model weights (file TrainedModelWeiht1m_steps_Semantic_TrainedWithLabPicsAndCOCO_AllSets.torch) and copy it into the model directory.
- From the root folder of the project, create the conda virtual environment: conda env create -f environment.yml
- Activate the virtual environment: conda activate streamlit-vessel-segmentation
- Run the app: streamlit run app.py
- Both CPU and GPU are supported to run the predictions on single images. CPU is enough to execute with good performance.
- The app.py script is the core Streamlit app and has been implemented by virtualramblas.
- The CategoryDictionary.py and FCN_NetModel.py scripts are the same as for the original implementation from Sagi Eppel. Their implementation for this project will change in the future.