AI Neural Network image upscaling filters

Talk about anything you want here
User avatar
MusicallyInspired
Village Elder
Posts: 3143
Joined: Fri Oct 10, 2008 8:46 am
Gender: Male
Location: Manitoba, Canada
Contact:

AI Neural Network image upscaling filters

Post by MusicallyInspired »

So this has been making the rounds in retro video game circles. It's been used with great effect for Doom sprite and texture upscaling and the Duke3D community has also been experimenting with it. I found a thread that featured upscaled backgrounds from Monkey Island 2 and the results are quite incredible (here's the thread with even more examples that are simply astounding). There are various models for filters available. One is waifu2x but that one makes things look only slightly better than your standard SuperEagle or hq2x filters. This one called ESRGAN (which uses a data set called Manga109 as a base) however....well, see for yourself.

Upscaled (no, seriously. this is an honest-to-god upscale without any post-editing):
Image

Original:
Image

And for the sake of comparison, here's the official MI2 Special Edition background:
Image

The results are pretty fantastic. Here's another one from MI2:
Image

Imagine seeing a filter like this generated in real-time in programs like ScummVM and DOSBox!
01010100 01110010 01110101 01110011 01110100 00100000 01010100 01001000 00110001
User avatar
MusicallyInspired
Village Elder
Posts: 3143
Joined: Fri Oct 10, 2008 8:46 am
Gender: Male
Location: Manitoba, Canada
Contact:

Re: AI Neural Network image upscaling filters

Post by MusicallyInspired »

A GIF comparison. I mean, just look at this. It's obviously not perfect but pretty darn close enough I'd say:
Image
01010100 01110010 01110101 01110011 01110100 00100000 01010100 01001000 00110001
User avatar
MusicallyInspired
Village Elder
Posts: 3143
Joined: Fri Oct 10, 2008 8:46 am
Gender: Male
Location: Manitoba, Canada
Contact:

Re: AI Neural Network image upscaling filters

Post by MusicallyInspired »

Curse of Monkey Island:
Image
01010100 01110010 01110101 01110011 01110100 00100000 01010100 01001000 00110001
User avatar
notbobsmith
Village Elder
Posts: 5276
Joined: Sun Mar 09, 2014 4:02 pm
Location: Massachusetts
Gender: Male

Re: AI Neural Network image upscaling filters

Post by notbobsmith »

The comparison of the first two images are really quite impressive. I looks like it turned the background back into the original artwork. You can even see the brushstrokes.
User avatar
MusicallyInspired
Village Elder
Posts: 3143
Joined: Fri Oct 10, 2008 8:46 am
Gender: Male
Location: Manitoba, Canada
Contact:

Re: AI Neural Network image upscaling filters

Post by MusicallyInspired »

On the King's Quest 6 CD-ROM there were a collection of hi-res versions of backgrounds from the game in 512x365 resolution (game resolution is 320x200). Using this upscaling method I converted one to 2048x1460 and it looks phenomenal!!!

Upscaled w/ESRGAN (click to download at full res!):
Image
Hi-res scan on KQ6 CD-ROM:
Image
In-game low-res original background:
Image
01010100 01110010 01110101 01110011 01110100 00100000 01010100 01001000 00110001
User avatar
Collector
Grand Poobah
Posts: 12008
Joined: Wed Oct 08, 2008 12:57 am
Location: Sierraland
Contact:

Re: AI Neural Network image upscaling filters

Post by Collector »

Now if this could be done in real time in DOSBox with the pixel perfect patch...
01000010 01111001 01110100 01100101 00100000 01101101 01100101 00100001

Image
User avatar
MusicallyInspired
Village Elder
Posts: 3143
Joined: Fri Oct 10, 2008 8:46 am
Gender: Male
Location: Manitoba, Canada
Contact:

Re: AI Neural Network image upscaling filters

Post by MusicallyInspired »

Someone in the thread mentioned it took him 8 seconds to render an image with his new RTX video card. Give that 10 years (if that) and we'll have a silky smooth 60fps framerate out of that.
01010100 01110010 01110101 01110011 01110100 00100000 01010100 01001000 00110001
User avatar
Semi-Happy Partygoer
Oldbie
Posts: 525
Joined: Sun Jun 25, 2017 11:44 pm

Re: AI Neural Network image upscaling filters

Post by Semi-Happy Partygoer »

Wow. This is incredible. I'll have to give it a go, though I'm not sure if my PC is fully compatible. I guess I'll just have to try and see.
"It is better to know some of the questions than all of the answers" - James Thurber
User avatar
MusicallyInspired
Village Elder
Posts: 3143
Joined: Fri Oct 10, 2008 8:46 am
Gender: Male
Location: Manitoba, Canada
Contact:

Re: AI Neural Network image upscaling filters

Post by MusicallyInspired »

01010100 01110010 01110101 01110011 01110100 00100000 01010100 01001000 00110001
User avatar
MusicallyInspired
Village Elder
Posts: 3143
Joined: Fri Oct 10, 2008 8:46 am
Gender: Male
Location: Manitoba, Canada
Contact:

Re: AI Neural Network image upscaling filters

Post by MusicallyInspired »

The Lord of the Dead (2048x1460):
Image
01010100 01110010 01110101 01110011 01110100 00100000 01010100 01001000 00110001
User avatar
Collector
Grand Poobah
Posts: 12008
Joined: Wed Oct 08, 2008 12:57 am
Location: Sierraland
Contact:

Re: AI Neural Network image upscaling filters

Post by Collector »

Love it. Well, if someone wanted to take all of the graphics from KQ6 and pre-render them to remake the game it would be great. Of course it would need to be under the radar until after the release. What is the upper resolution that AGS will deal with?
01000010 01111001 01110100 01100101 00100000 01101101 01100101 00100001

Image
User avatar
Semi-Happy Partygoer
Oldbie
Posts: 525
Joined: Sun Jun 25, 2017 11:44 pm

Re: AI Neural Network image upscaling filters

Post by Semi-Happy Partygoer »

MusicallyInspired wrote: Tue Jan 08, 2019 9:40 pm Here's a good starting point
Thank you for that. This is a bit beyond anything I've tried before, but I will make some time to give it a whirl. I always like learning new techniques.
"It is better to know some of the questions than all of the answers" - James Thurber
User avatar
Tawmis
Grand Poobah's Servant
Posts: 20801
Joined: Wed Oct 08, 2008 1:19 am
Gender: Not Specified
Contact:

Re: AI Neural Network image upscaling filters

Post by Tawmis »

These are amazing.
User avatar
Jules
Delta Babe
Posts: 2298
Joined: Wed Oct 08, 2008 2:59 am
Location: in the mountains

Re: AI Neural Network image upscaling filters

Post by Jules »

Wow those are so nice! The Lord of the Dead one is awesome.
User avatar
MusicallyInspired
Village Elder
Posts: 3143
Joined: Fri Oct 10, 2008 8:46 am
Gender: Male
Location: Manitoba, Canada
Contact:

Re: AI Neural Network image upscaling filters

Post by MusicallyInspired »

I took most of yesterday and wrote a script that extracts background resources from a Sierra game, converts to PNG, and upscales with ESRGAN. I'm doing all the Sierra games and uploading them to a Google Drive folder. I'll upload more as time goes on: https://drive.google.com/drive/folders/ ... sp=sharing

For PQ4 (and some screens in PQ3) I'm going to try a different model that's more accustomed and trained to restore low resolution live photos. It's coming out more like a painting, and while that's cool, I think it can do these better.

For QFG4, all the backgrounds are in pieces with foreground objects as different picture resources entirely so I'm going to take more time with that one and stitch them all together before upscaling.
01010100 01110010 01110101 01110011 01110100 00100000 01010100 01001000 00110001
Post Reply

Return to “Miscellaneous Chatter”