|
|
--- |
|
|
license: mit |
|
|
title: PetroSeg |
|
|
sdk: streamlit |
|
|
emoji: π |
|
|
colorFrom: red |
|
|
colorTo: yellow |
|
|
--- |
|
|
# Unsupervised Segmentation App with Streamlit and PyTorch |
|
|
|
|
|
## Table of Contents |
|
|
1. [Introduction](#introduction) |
|
|
2. [Acknowledgments](#acknowledgments) |
|
|
3. [Requirements](#requirements) |
|
|
4. [Installation](#installation) |
|
|
5. [How to Run](#how-to-run) |
|
|
6. [Code Explanation](#code-explanation) |
|
|
7. [Contributing](#contributing) |
|
|
8. [License](#license) |
|
|
|
|
|
--- |
|
|
|
|
|
## Introduction π |
|
|
This project is a web application built using Streamlit and PyTorch. It performs unsupervised segmentation on uploaded images. The segmented image can be downloaded, and the colors of the segments can be customized. |
|
|
|
|
|
--- |
|
|
|
|
|
## Acknowledgments π |
|
|
This code is inspired from the project [pytorch-unsupervised-segmentation](https://github.com/kanezaki/pytorch-unsupervised-segmentation) by kanezaki. The original project is based on the paper "Unsupervised Image Segmentation by Backpropagation" presented at IEEE ICASSP 2018. The code is optimized for thin section images and microscopy analysis. |
|
|
|
|
|
--- |
|
|
|
|
|
## Requirements π |
|
|
- Python 3.x |
|
|
- Streamlit |
|
|
- PyTorch |
|
|
- OpenCV |
|
|
- NumPy |
|
|
- scikit-image |
|
|
- PIL |
|
|
- base64 |
|
|
|
|
|
--- |
|
|
|
|
|
## Installation π οΈ |
|
|
|
|
|
1. **Clone the repository** |
|
|
```bash |
|
|
git clone https://github.com/your-repo/unsupervised-segmentation.git |
|
|
``` |
|
|
2. **Navigate to the project directory** |
|
|
```bash |
|
|
cd unsupervised-segmentation |
|
|
``` |
|
|
3. **Install the required packages** |
|
|
```bash |
|
|
pip install -r requirements.txt |
|
|
``` |
|
|
|
|
|
--- |
|
|
|
|
|
## How to Run π |
|
|
|
|
|
1. **Navigate to the project directory** |
|
|
```bash |
|
|
cd unsupervised-segmentation |
|
|
``` |
|
|
2. **Run the Streamlit app** |
|
|
```bash |
|
|
streamlit run app.py |
|
|
``` |
|
|
|
|
|
--- |
|
|
 |
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
## Contributing π€ |
|
|
Feel free to open issues and pull requests! |
|
|
|
|
|
--- |
|
|
|
|
|
## License π |
|
|
This project is licensed under the MIT License. |