# AI Neural Net upscaling of old pixel backgrounds

**URL:** <https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465>\
**Category:** Adventure/Lucasfilm Games\
**Created:** [January 10, 2019, 2:51pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465 "2019-01-10T14:51:26Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![patrik3dspacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/patrik3dspacek/32/16_2.png) [@patrik3dspacek](https://forums.thimbleweedpark.com/u/patrik3dspacek)\
**Post date:** [January 18, 2019, 12:38pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/45 "2019-01-18T12:38:51Z")

</div>

I am afraid, this cannot be used as filter. The whole game needs to have pre-calculated art. It would be very slow.

---

<div class="post-metadata">

**Author:** ![Someone](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Someone](https://forums.thimbleweedpark.com/u/Someone)\
**Post date:** [January 21, 2019, 11:56am UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/46 "2019-01-21T11:56:25Z")

</div>

You could use the cloud for the computations (like “Siri” analyzes the spoken sentences) or do the computations in a “pre-rendering” phase (where the player has to wait). In both cases ScummVM could cache the scaled images and reuse them.

---

<div class="post-metadata">

**Author:** ![Frenzie](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/frenzie/32/4416_2.png) [@Frenzie](https://forums.thimbleweedpark.com/u/Frenzie)\
**Post date:** [January 21, 2019, 2:08pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/47 "2019-01-21T14:08:44Z")

</div>

> [@patrik3dspacek](#):
>
> I am afraid, this cannot be used as filter. The whole game needs to have pre-calculated art. It would be very slow.

Btw, what kind of GPU did you use for the calculations and what’s the order of magnitude of duration? (I.e., are we talking half a second, 2 seconds, 20, 200, even more?)

---

<div class="post-metadata">

**Author:** ![patrik3dspacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/patrik3dspacek/32/16_2.png) [@patrik3dspacek](https://forums.thimbleweedpark.com/u/patrik3dspacek)\
**Post date:** [January 21, 2019, 3:02pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/48 "2019-01-21T15:02:25Z")

</div>

I just started this blog about ESRGAN.  
[ESRGAN blog](https://esrgan.blogspot.com/)

I will add lots of info and pictures today; duration, interpolations, new models etc.

check this out

---

<div class="post-metadata">

**Author:** ![Frenzie](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/frenzie/32/4416_2.png) [@Frenzie](https://forums.thimbleweedpark.com/u/Frenzie)\
**Post date:** [January 22, 2019, 3:09pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/49 "2019-01-22T15:09:40Z")

</div>

Very detailed, thanks!

But I’m still a bit unclear on the time frame. You write that it takes ~3 minutes for 100 interpolations, but then you say that processing 110 images to 110 000 interpolations took you 3 days, not a year. Then wouldn’t it be something more in the ballpark of 100 \* 100 interpolations in ~3 minutes?

---

<div class="post-metadata">

**Author:** ![Kuma](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/kuma/32/105_2.png) [@Kuma](https://forums.thimbleweedpark.com/u/Kuma)\
**Post date:** [January 22, 2019, 3:25pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/50 "2019-01-22T15:25:27Z")

</div>

Could somebody apply ESRGAN upscaling to an Ultima 7 screenshot?

For example:

 ![](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/8/8c884cc1c44c4286e61428c65fbcfd4f801bd002.jpeg)

Would love to see how one of my favourite games ever would look with it. 🙂

---

<div class="post-metadata">

**Author:** ![kaiman](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@kaiman](https://forums.thimbleweedpark.com/u/kaiman)\
**Post date:** [January 22, 2019, 6:01pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/51 "2019-01-22T18:01:00Z")

</div>

> [@Kuma](#):
>
> Would love to see how ~~one of~~ my favourite game ~~s~~ ever would look with it. 🙂

@patrik3dspacek I second that request.

---

<div class="post-metadata">

**Author:** ![patrik3dspacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/patrik3dspacek/32/16_2.png) [@patrik3dspacek](https://forums.thimbleweedpark.com/u/patrik3dspacek)\
**Post date:** [January 22, 2019, 6:44pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/52 "2019-01-22T18:44:52Z")

</div>

Its not per image… its GPU frequency processing certain task. Every task makes the image more clear.  
Its like impulses 😀

---

<div class="post-metadata">

**Author:** ![patrik3dspacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/patrik3dspacek/32/16_2.png) [@patrik3dspacek](https://forums.thimbleweedpark.com/u/patrik3dspacek)\
**Post date:** [January 22, 2019, 7:00pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/53 "2019-01-22T19:00:32Z")

</div>

I think, this image wont bring any improvements. This image is too boxy made by cubical parts and its very simple colored. You can get 2K resolution, but with same pixelated result.

---

<div class="post-metadata">

**Author:** ![Kuma](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/kuma/32/105_2.png) [@Kuma](https://forums.thimbleweedpark.com/u/Kuma)\
**Post date:** [January 22, 2019, 8:11pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/54 "2019-01-22T20:11:08Z")

</div>

Hmm, I see. Makes sense.

---

<div class="post-metadata">

**Author:** ![Sushi](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/sushi/32/163_2.png) [@Sushi](https://forums.thimbleweedpark.com/u/Sushi)\
**Post date:** [January 23, 2019, 6:47am UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/55 "2019-01-23T06:47:52Z")

</div>

Too boxy & pixelated? 🤔

Perhaps if you train it using minecraft images?

---

<div class="post-metadata">

**Author:** ![Frenzie](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/frenzie/32/4416_2.png) [@Frenzie](https://forums.thimbleweedpark.com/u/Frenzie)\
**Post date:** [January 23, 2019, 9:26am UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/56 "2019-01-23T09:26:58Z")

</div>

If I understand correctly it’s trained using blurry downscaled photographs by default, so that lends itself better to an MI2 than the cleaner look of Ultima 7.

> **[ESRGAN/models at 24eca1d826ba7d059d86fdad60e2b04e0390419c · xinntao/ESRGAN](https://github.com/xinntao/ESRGAN/tree/24eca1d826ba7d059d86fdad60e2b04e0390419c/models)**
>
> ECCV18 Workshops - Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution. The training codes are in BasicSR. - xinntao/ESRGAN

> _Note that_ the pretrained models are trained under the `MATLAB bicubic` kernel. If the downsampled kernel is different from that, the results may have artifacts.

## RRDB\_ESRGAN\_x4.pth

 ![church_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/d/d83f5ae9747dc3ba037069bb4de93e82a51cf833.jpeg) ![fence_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/0/09454235b3baae3682f654acf32fc54555dd4cb9.png) ![fountain_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/2/29706687506e37ee6702fbaeca4760d5c881128c.png)

## RRDB\_PSNR\_x4.pth

 ![church_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/a/a28e21d390d9cf0d122803530b1071b93de272e2.jpeg) ![fence_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/3/3363bb4f0512a361e961d9abbfc8a123a0546aa5.png) ![fountain_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/4/47417ef2770ce986d0bf16fbac9d490b730e75e7.png)

Knowing that, I tried bicubic downscaling to make it a little blurrier before processing:

 ![fountain-blurry_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/4/4d99eae6fa1b127ff4fc3b16c2f1ca95f3e5c606.png)

And libdepixelize for comparison:

Voronoi diagram:

 ![asg105345](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/1/11d884ac45cf59d0db77fca6f93f937bff417b5e.png)

B-spline curves:

 ![g58439](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/a/ae1763a4f11e86cec934116f63482bfdfabf5ef2.png)

---

<div class="post-metadata">

**Author:** ![patrik3dspacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/patrik3dspacek/32/16_2.png) [@patrik3dspacek](https://forums.thimbleweedpark.com/u/patrik3dspacek)\
**Post date:** [January 23, 2019, 12:38pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/57 "2019-01-23T12:38:28Z")

</div>

thats correct… I believe your B-spline curve and Voronoi would look good with adventure games backgrounds. You should try that, I can give you original png images.

Ultima 7 is such a hard and specific image.

---

<div class="post-metadata">

**Author:** ![seguso](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/seguso/32/1232_2.png) [@seguso](https://forums.thimbleweedpark.com/u/seguso)\
**Post date:** [January 28, 2019, 10:01am UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/58 "2019-01-28T10:01:55Z")

</div>

> [@Kuma](#):
>
> Would love to see how one of my favourite games ever would look with it.

HQ4x is already a huge improvement there. have you checked that out?

---

<div class="post-metadata">

**Author:** ![Kuma](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/kuma/32/105_2.png) [@Kuma](https://forums.thimbleweedpark.com/u/Kuma)\
**Post date:** [January 28, 2019, 11:19am UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/59 "2019-01-28T11:19:34Z")

</div>

Ah, that’s an Exult setting, right? Will have to look into it, I have only played Exult with the more classic pixel-precise upscaling so far.  
Thanks for the tip!

---

<div class="post-metadata">

**Author:** ![seguso](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/seguso/32/1232_2.png) [@seguso](https://forums.thimbleweedpark.com/u/seguso)\
**Post date:** [January 28, 2019, 11:22am UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/60 "2019-01-28T11:22:17Z")

</div>

Yes, an Exult setting. I’d like to have the time to replay U7, especially part 2…

---

<div class="post-metadata">

**Author:** ![kaiman](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@kaiman](https://forums.thimbleweedpark.com/u/kaiman)\
**Post date:** [January 28, 2019, 5:23pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/61 "2019-01-28T17:23:19Z")

</div>

> [@seguso](#):
>
> I’d like to have the time to replay U7, especially part 2…

I stopped my last playthrough of U7 (part 1) after acquiring the three prisms and following the trail of Elizabeth and Abraham to Buccaneer’s Den. It’s pretty linear from that point onwards, the world mostly explored, all side quests finished. So for lack of novelty, I did not continue. Since part 2 is much more story-driven (and I still remember the most important plot points), I never really mustered the energy to even begin a replay. Same deal with many adventure games, really. I mean, even Memoria I played only once.

---

<div class="post-metadata">

**Author:** ![patrik3dspacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/patrik3dspacek/32/16_2.png) [@patrik3dspacek](https://forums.thimbleweedpark.com/u/patrik3dspacek)\
**Post date:** [January 30, 2019, 11:07pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/62 "2019-01-30T23:07:10Z")

</div>

I finally replicated Manga109 quality and made it slightly even better. I updated my ESRGAN blog with some results. Image below is my new pre-trained quality. I didnt do any post touches.

 ![TWP_001_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/5/5f49647406671dcc3e621e345673602dbc8ca335.jpeg)

 ![TWP_002_rlt](https://canada1.discourse-cdn.com/flex030/uploads/thimbleweedpark/original/2X/3/33493a4fa2c1465dd7a6813c3723ea4fda107ccb.jpeg)

More here:  
[https://drive.google.com/open?id=1nLpvquSBBUm\_vp96-2DnclgEvh1XvWRG](https://drive.google.com/open?id=1nLpvquSBBUm_vp96-2DnclgEvh1XvWRG)

---

<div class="post-metadata">

**Author:** ![dangerouslee](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@dangerouslee](https://forums.thimbleweedpark.com/u/dangerouslee)\
**Post date:** [March 14, 2019, 4:00am UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/63 "2019-03-14T04:00:21Z")

</div>

Can someone do some “Broken Sword 1” backgrounds using this tech? I would love to see those backgrounds after the upres process.

I would try it myself, but don’t understand how it works…

---

<div class="post-metadata">

**Author:** ![patrik3dspacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.thimbleweedpark.com/patrik3dspacek/32/16_2.png) [@patrik3dspacek](https://forums.thimbleweedpark.com/u/patrik3dspacek)\
**Post date:** [March 14, 2019, 1:15pm UTC](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465/64 "2019-03-14T13:15:38Z")

</div>

I will look at it…

[Previous page](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465.md?page=2)

[Next page](https://forums.thimbleweedpark.com/t/ai-neural-net-upscaling-of-old-pixel-backgrounds/3465.md?page=4)
