Point CSA code and training links to master
Browse filesUse the promoted master branch for source code, training, usage, and data documentation. Refresh the README checksum and release manifest.
- README.md +8 -8
- SHA256SUMS +2 -2
- release-manifest.json +2 -2
README.md
CHANGED
|
@@ -23,10 +23,10 @@ tags:
|
|
| 23 |
|
| 24 |
<p>
|
| 25 |
<a href="https://openaccess.thecvf.com/content_ICCV_2019/html/Liu_Coherent_Semantic_Attention_for_Image_Inpainting_ICCV_2019_paper.html">Paper</a> 路
|
| 26 |
-
<a href="https://github.com/KumapowerLIU/CSA-inpainting/tree/
|
| 27 |
<a href="#try-the-checkpoint">Quickstart</a> 路
|
| 28 |
-
<a href="https://github.com/KumapowerLIU/CSA-inpainting/blob/
|
| 29 |
-
<a href="https://github.com/KumapowerLIU/CSA-inpainting/blob/
|
| 30 |
</p>
|
| 31 |
|
| 32 |
<img src="https://huggingface.co/KumaPower/CSA/resolve/main/preview.jpg" alt="Actual CSA completions: masked input, restored image, and original image." width="960">
|
|
@@ -36,7 +36,7 @@ Selected examples; <a href="preview-full.jpg">view all eight cases</a>.</sub></p
|
|
| 36 |
|
| 37 |
</div>
|
| 38 |
|
| 39 |
-
The author's **CSA** checkpoint combines a separately trained rough U-Net with CSA refinement. This modern release uses random masks, **L1 + LPIPS**, and the original image and feature **PatchGANs**. It updates the original paper's training recipe; see [implementation notes](https://github.com/KumapowerLIU/CSA-inpainting/blob/
|
| 40 |
|
| 41 |
The released refinement checkpoint is **step 97,397**, with a frozen rough parent at **step 156,181**. It was selected by visual review, rather than automatic best-metric selection.
|
| 42 |
|
|
@@ -69,7 +69,7 @@ print(torch.__version__, torchvision.__version__)
|
|
| 69 |
PY
|
| 70 |
```
|
| 71 |
|
| 72 |
-
For CPU, macOS, or a source installation, use the [installation guide](https://github.com/KumapowerLIU/CSA-inpainting/blob/
|
| 73 |
|
| 74 |
### 2. Download and run
|
| 75 |
|
|
@@ -109,11 +109,11 @@ csa infer \
|
|
| 109 |
|
| 110 |
**White = fill; black = keep.** Image and mask dimensions must match. An intact image also works: the CLI masks the hole internally. The example above is a real checkpoint output.
|
| 111 |
|
| 112 |
-
The model was trained at **256 脳 256**. Other sizes are padded and cropped, but their restoration quality has not been validated. `--device auto` selects CUDA, then MPS, then CPU. See [usage](https://github.com/KumapowerLIU/CSA-inpainting/blob/
|
| 113 |
|
| 114 |
## Train and extend
|
| 115 |
|
| 116 |
-
Use the [source repository](https://github.com/KumapowerLIU/CSA-inpainting/tree/
|
| 117 |
|
| 118 |
| Objective | Fresh-training recipe |
|
| 119 |
|---|---|
|
|
@@ -143,7 +143,7 @@ Stage 2 uses original PatchGAN architectures with random initialization and RaLS
|
|
| 143 |
| Places365-Standard | 901,730 images: half of 1,803,460 training images | [Download page](http://places2.csail.mit.edu/download.html) 路 [CSAIL repository](https://github.com/CSAILVision/places365) |
|
| 144 |
| HDTF talking-head frames | Added during stage 2: 30,128 frames represented by 299,469 sampling entries | [HDTF data and preprocessing](https://github.com/MRzzm/HDTF) |
|
| 145 |
|
| 146 |
-
The base mixture contains **1,197,875 entries**; the final stage-2 mixture contains **1,497,344 sampling entries**, approximately 20% faces. Repeated entries are not unique images. The exact local splits are not distributed; [dataset preparation and provenance](https://github.com/KumapowerLIU/CSA-inpainting/blob/
|
| 147 |
|
| 148 |
## Checkpoint and provenance
|
| 149 |
|
|
|
|
| 23 |
|
| 24 |
<p>
|
| 25 |
<a href="https://openaccess.thecvf.com/content_ICCV_2019/html/Liu_Coherent_Semantic_Attention_for_Image_Inpainting_ICCV_2019_paper.html">Paper</a> 路
|
| 26 |
+
<a href="https://github.com/KumapowerLIU/CSA-inpainting/tree/master">Code</a> 路
|
| 27 |
<a href="#try-the-checkpoint">Quickstart</a> 路
|
| 28 |
+
<a href="https://github.com/KumapowerLIU/CSA-inpainting/blob/master/docs/TRAINING.md">Training</a> 路
|
| 29 |
+
<a href="https://github.com/KumapowerLIU/CSA-inpainting/blob/master/docs/DATASETS.md">Datasets</a>
|
| 30 |
</p>
|
| 31 |
|
| 32 |
<img src="https://huggingface.co/KumaPower/CSA/resolve/main/preview.jpg" alt="Actual CSA completions: masked input, restored image, and original image." width="960">
|
|
|
|
| 36 |
|
| 37 |
</div>
|
| 38 |
|
| 39 |
+
The author's **CSA** checkpoint combines a separately trained rough U-Net with CSA refinement. This modern release uses random masks, **L1 + LPIPS**, and the original image and feature **PatchGANs**. It updates the original paper's training recipe; see [implementation notes](https://github.com/KumapowerLIU/CSA-inpainting/blob/master/docs/MIGRATION.md).
|
| 40 |
|
| 41 |
The released refinement checkpoint is **step 97,397**, with a frozen rough parent at **step 156,181**. It was selected by visual review, rather than automatic best-metric selection.
|
| 42 |
|
|
|
|
| 69 |
PY
|
| 70 |
```
|
| 71 |
|
| 72 |
+
For CPU, macOS, or a source installation, use the [installation guide](https://github.com/KumapowerLIU/CSA-inpainting/blob/master/docs/USAGE.md#installation-and-devices).
|
| 73 |
|
| 74 |
### 2. Download and run
|
| 75 |
|
|
|
|
| 109 |
|
| 110 |
**White = fill; black = keep.** Image and mask dimensions must match. An intact image also works: the CLI masks the hole internally. The example above is a real checkpoint output.
|
| 111 |
|
| 112 |
+
The model was trained at **256 脳 256**. Other sizes are padded and cropped, but their restoration quality has not been validated. `--device auto` selects CUDA, then MPS, then CPU. See [usage](https://github.com/KumapowerLIU/CSA-inpainting/blob/master/docs/USAGE.md) for custom inputs and folder evaluation.
|
| 113 |
|
| 114 |
## Train and extend
|
| 115 |
|
| 116 |
+
Use the [source repository](https://github.com/KumapowerLIU/CSA-inpainting/tree/master) and [two-stage training guide](https://github.com/KumapowerLIU/CSA-inpainting/blob/master/docs/TRAINING.md) to prepare image indices, train rough prediction, initialize refinement, and resume a run. Install the training dependencies with `python -m pip install -e '.[perceptual]'` from the checkout.
|
| 117 |
|
| 118 |
| Objective | Fresh-training recipe |
|
| 119 |
|---|---|
|
|
|
|
| 143 |
| Places365-Standard | 901,730 images: half of 1,803,460 training images | [Download page](http://places2.csail.mit.edu/download.html) 路 [CSAIL repository](https://github.com/CSAILVision/places365) |
|
| 144 |
| HDTF talking-head frames | Added during stage 2: 30,128 frames represented by 299,469 sampling entries | [HDTF data and preprocessing](https://github.com/MRzzm/HDTF) |
|
| 145 |
|
| 146 |
+
The base mixture contains **1,197,875 entries**; the final stage-2 mixture contains **1,497,344 sampling entries**, approximately 20% faces. Repeated entries are not unique images. The exact local splits are not distributed; [dataset preparation and provenance](https://github.com/KumapowerLIU/CSA-inpainting/blob/master/docs/DATASETS.md) explain the selection and how to use public sources or your own images.
|
| 147 |
|
| 148 |
## Checkpoint and provenance
|
| 149 |
|
SHA256SUMS
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
3d7f9859efabc748c7e1a9da0115900fbb923d1c6ce643cef836e8ffa4e9df14 LICENSE.md
|
| 2 |
-
|
| 3 |
3b5241738138ce9960464b09b275808039e48475022fa7eb4a23963c0d09859f csa-inpainting-source.tar.gz
|
| 4 |
605b80c18dcb0856367e6276813df0b54ec42aabea782af1631052aedb7abdfe csa-stage2-step97397.pt
|
| 5 |
508405994683bb63f25d35d95bcebb88037a8f15766be1a2448e219378657e00 csa_inpainting-0.3.0-py3-none-any.whl
|
|
@@ -14,7 +14,7 @@ a85aa71360708cd7d04003af66872879cba232a55f3a5408797e7462059df03d examples/mask.
|
|
| 14 |
508e3718cd2e16426cb07a2868e61991800889ba5542d12ed9fb43701a830ade pipeline.svg
|
| 15 |
6915109589a4301e1446020dd59091cd51e96854b64b072237e9487ed62ab9d6 preview-full.jpg
|
| 16 |
bc1ec86541d7a24a23f8ce910c7480d897e749b53d1d9e0a9168ee70e99f91fb preview.jpg
|
| 17 |
-
|
| 18 |
4d50b1d51a4e9b94c6be822f4f27668d0e956b1c9e587ebbe656059afcaeaab9 source-compatibility.json
|
| 19 |
4d16a9fd9ebeb9a011bb4f8a05c7da8c02140a632c586022086e9d6a07da119b source-manifest.json
|
| 20 |
8a8cda5a147a987b996ee8b2cdd389f8608103371a947ac4b6a1d33fbf93586a training-config.yaml
|
|
|
|
| 1 |
3d7f9859efabc748c7e1a9da0115900fbb923d1c6ce643cef836e8ffa4e9df14 LICENSE.md
|
| 2 |
+
7d5b2e52a56c4c4f5a8d8bfed406f75e2485ca2c6db8eb136162f721289d25a5 README.md
|
| 3 |
3b5241738138ce9960464b09b275808039e48475022fa7eb4a23963c0d09859f csa-inpainting-source.tar.gz
|
| 4 |
605b80c18dcb0856367e6276813df0b54ec42aabea782af1631052aedb7abdfe csa-stage2-step97397.pt
|
| 5 |
508405994683bb63f25d35d95bcebb88037a8f15766be1a2448e219378657e00 csa_inpainting-0.3.0-py3-none-any.whl
|
|
|
|
| 14 |
508e3718cd2e16426cb07a2868e61991800889ba5542d12ed9fb43701a830ade pipeline.svg
|
| 15 |
6915109589a4301e1446020dd59091cd51e96854b64b072237e9487ed62ab9d6 preview-full.jpg
|
| 16 |
bc1ec86541d7a24a23f8ce910c7480d897e749b53d1d9e0a9168ee70e99f91fb preview.jpg
|
| 17 |
+
7f978d19eafc31b4e859da1a8d958e1b07e0bf7a7295114c35ddab94a27c751f release-manifest.json
|
| 18 |
4d50b1d51a4e9b94c6be822f4f27668d0e956b1c9e587ebbe656059afcaeaab9 source-compatibility.json
|
| 19 |
4d16a9fd9ebeb9a011bb4f8a05c7da8c02140a632c586022086e9d6a07da119b source-manifest.json
|
| 20 |
8a8cda5a147a987b996ee8b2cdd389f8608103371a947ac4b6a1d33fbf93586a training-config.yaml
|
release-manifest.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
| 9 |
"sha256": "3d7f9859efabc748c7e1a9da0115900fbb923d1c6ce643cef836e8ffa4e9df14"
|
| 10 |
},
|
| 11 |
"README.md": {
|
| 12 |
-
"bytes":
|
| 13 |
-
"sha256": "
|
| 14 |
},
|
| 15 |
"csa-inpainting-source.tar.gz": {
|
| 16 |
"bytes": 3871507,
|
|
|
|
| 9 |
"sha256": "3d7f9859efabc748c7e1a9da0115900fbb923d1c6ce643cef836e8ffa4e9df14"
|
| 10 |
},
|
| 11 |
"README.md": {
|
| 12 |
+
"bytes": 9104,
|
| 13 |
+
"sha256": "7d5b2e52a56c4c4f5a8d8bfed406f75e2485ca2c6db8eb136162f721289d25a5"
|
| 14 |
},
|
| 15 |
"csa-inpainting-source.tar.gz": {
|
| 16 |
"bytes": 3871507,
|