davidramos
commited on
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- phiyodr/coco2017
|
5 |
+
---
|
6 |
+
An implementation of the [Pix2Pix](https://arxiv.org/abs/1611.07004) paper for image colorization using PyTorch.
|
7 |
+
|
8 |
+
Try a trained on Google Colab:
|
9 |
+
|
10 |
+
<a href="https://colab.research.google.com/github/DavidRamosArchilla/Colorizing-images/blob/main/image_colorization_demo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
|
11 |
+
|
12 |
+
---
|
13 |
+
To download it:
|
14 |
+
|
15 |
+
```python
|
16 |
+
from huggingface_hub import hf_hub_download
|
17 |
+
|
18 |
+
model_path = hf_hub_download(
|
19 |
+
repo_id="davidramos/image-colorization",
|
20 |
+
filename="model.pth"
|
21 |
+
)
|
22 |
+
```
|
23 |
+
|
24 |
+
and to load the weights into a model, first clone this repo (or grab the needed files):
|
25 |
+
```bash
|
26 |
+
git clone https://github.com/yourusername/colorizing_images.git
|
27 |
+
cd colorizing_images
|
28 |
+
```
|
29 |
+
|
30 |
+
and create a model intance:
|
31 |
+
```python
|
32 |
+
from models import ColorizingNet
|
33 |
+
model = ColorizingNet(device)
|
34 |
+
model.load_state_dict(torch.load(model_path))
|
35 |
+
```
|