From 8d72cabff5d83019c5328e4158a65316033fc8ec Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 20 Sep 2026 18:34:41 +0200 Subject: [PATCH] Ship the border filler trained against MI-GAN's own discriminator: texture in the deep bands, level with stock on LPIPS --- docs/panorama.md | 27 +++++++++++++++++++++------ models/LICENCE.md | 2 +- models/inpaint/migan-512.onnx | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/panorama.md b/docs/panorama.md index 904efcc..de95209 100644 --- a/docs/panorama.md +++ b/docs/panorama.md @@ -538,9 +538,24 @@ each loss weighting did, and the two runs abandoned (blur under L1 in the hole; a brick pattern under a strong adversarial term against a discriminator that had not learned) — is `runs/` in `darkroom-infill`. -**What is still wrong.** The ground fill is softer than its context — -texture, not structure, is what a night on a laptop GPU could not finish. -The levers, in order: a discriminator that learns (a pretrained one — -MI-GAN's own from the unfused checkpoint — instead of a PatchGAN from -scratch), feature matching, and more steps at 512. FR-MRG-4's -*experimental* stays. +**Second model, the same day.** The morning's fill was soft in the deep +ground bands. The afternoon's run trained the generator against MI-GAN's +own pretrained discriminator (non-saturating loss, lazy R1, feature +matching), with fresh noise inputs while training and flip/translation +augmentation of the discriminator's input — both needed, or the generator +settles into a periodic texture the discriminator cannot see. The shipped +weights (step 4 750 of `runs/border-v6`) are level with the stock model on +LPIPS (edge 0.125 / corner 0.187 against 0.121 / 0.183) while keeping the +PSNR gain (edge 18.0 / corner 15.7 against 16.9 / 14.6). On the fixture +the ground bands now carry texture at the right tone; at 1:1 a faint +regular hatch is visible in the deepest part. + +**What is still wrong.** The hatch, and any deep textured void the +generator must invent. The better answer for those is not generative: +seed the void with the picture's own texture in hexagonal cells, let the +discriminator rank the candidates, and let the generator heal only the +gaps between cells — built and measured in `darkroom-infill` +(`infill/hexfill.py`), the most convincing scree corner produced so far, +and the next thing to port into `dr_pano::fill` (it needs the +discriminator as a second model, ~80 MB fp16). FR-MRG-4's *experimental* +stays. diff --git a/models/LICENCE.md b/models/LICENCE.md index 2039c0e..d83ce32 100644 --- a/models/LICENCE.md +++ b/models/LICENCE.md @@ -104,7 +104,7 @@ the dataset licence restricts models trained on it by name. | File | Source | Trained on | Used by | |---|---|---|---| -| `inpaint/migan-512.onnx` | `migan_512_places2.pt` from `https://github.com/Picsart-AI-Research/MI-GAN` (Sargsyan et al., ICCV 2023), **fine-tuned** in the `darkroom-infill` repository (2026-09-20) | Places2 by the authors, then ~7 400 of the maintainer's own photographs with border-shaped voids | the panorama border fill (FR-MRG-4) | +| `inpaint/migan-512.onnx` | `migan_512_places2.pt` from `https://github.com/Picsart-AI-Research/MI-GAN` (Sargsyan et al., ICCV 2023), **fine-tuned** in the `darkroom-infill` repository (2026-09-20, second model that evening: trained against MI-GAN's own discriminator) | Places2 by the authors, then ~7 400 of the maintainer's own photographs with border-shaped voids | the panorama border fill (FR-MRG-4) | The bare 512 generator at a fixed `1×4×512×512`, six operator types; the tiling, the context and the blend are Rust (`dr_pano::fill`). Since diff --git a/models/inpaint/migan-512.onnx b/models/inpaint/migan-512.onnx index 41211ef..8824e3f 100644 --- a/models/inpaint/migan-512.onnx +++ b/models/inpaint/migan-512.onnx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c44dfe0740662f875cfd59ac119ebb39828ffc6a5e3f8fdbed02e356d08a4c52 +oid sha256:f4a114a23a7c36c727253493d269cbec5d7e9d76f9e45913aed8d25c93377740 size 29604484