Spaces:
Running
Running
shawnljw
commited on
Commit
·
73dce95
1
Parent(s):
52983bc
add usage instructions
Browse files- README.md +26 -1
- environment.yml +11 -0
- requirements.txt +5 -0
README.md
CHANGED
@@ -4,4 +4,29 @@
|
|
4 |
|
5 |
A simple tool that converts an image into a coloring book. It runs on a custom implementation of the k-means clustering algorithm by default but comes with the option to use scikit-learn's implementation.
|
6 |
|
7 |
-
This [Colab notebook](https://colab.research.google.com/drive/1S91AsP2XHUKuxtUBEaFlboWd8ScAndcz?usp=sharing) explains how the coloring books are generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
A simple tool that converts an image into a coloring book. It runs on a custom implementation of the k-means clustering algorithm by default but comes with the option to use scikit-learn's implementation.
|
6 |
|
7 |
+
This [Colab notebook](https://colab.research.google.com/drive/1S91AsP2XHUKuxtUBEaFlboWd8ScAndcz?usp=sharing) explains how the coloring books are generated.
|
8 |
+
|
9 |
+
## Usage
|
10 |
+
|
11 |
+
Once you downloaded or cloned this repo, open the directory in your terminal.
|
12 |
+
|
13 |
+
If you have conda installed:
|
14 |
+
|
15 |
+
```shell
|
16 |
+
conda env create -f environment.yml
|
17 |
+
conda activate image2coloringbook
|
18 |
+
```
|
19 |
+
|
20 |
+
Otherwise create a virtual environment and install with pip
|
21 |
+
|
22 |
+
```shell
|
23 |
+
python -m venv image2coloringbook
|
24 |
+
image2coloringbook\Scripts\activate.bat
|
25 |
+
pip install -r requirements.txt
|
26 |
+
```
|
27 |
+
|
28 |
+
Once all requirements are installed, you can run the web ui with
|
29 |
+
|
30 |
+
```shell
|
31 |
+
gradio app.py
|
32 |
+
```
|
environment.yml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: image2coloringbook
|
2 |
+
channels:
|
3 |
+
- conda-forge
|
4 |
+
- defaults
|
5 |
+
dependencies:
|
6 |
+
- python=3.10
|
7 |
+
- gradio=3.23.0
|
8 |
+
- numpy=1.26.0
|
9 |
+
- opencv=4.6.0
|
10 |
+
- tqdm=4.66.1
|
11 |
+
- scikit-learn=1.3.0
|
requirements.txt
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
gradio==3.23.0
|
2 |
+
numpy==1.26.0
|
3 |
+
opencv==4.6.0
|
4 |
+
tqdm==4.66.1
|
5 |
+
scikit-learn==1.3.0
|