File size: 959 Bytes
1531281 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
---
license: mit
datasets:
- phiyodr/coco2017
---
An implementation of the [Pix2Pix](https://arxiv.org/abs/1611.07004) paper for image colorization using PyTorch.
Try a trained on Google Colab:
<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>
---
To download it:
```python
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
repo_id="davidramos/image-colorization",
filename="model.pth"
)
```
and to load the weights into a model, first clone this repo (or grab the needed files):
```bash
git clone https://github.com/yourusername/colorizing_images.git
cd colorizing_images
```
and create a model intance:
```python
from models import ColorizingNet
model = ColorizingNet(device)
model.load_state_dict(torch.load(model_path))
``` |