Jump to content
DX'Cellent

Upscaling layouts using AI


johnparker007
 Share

Recommended Posts

Hi there :) 

I was just having a quick play with AI upscaling (as it'd be possible to build a tool to automatically upscale existing layouts, removing pixellation).  I've been away from the scene for a long time - has this already been done?

Here's an example, where I took Dr Who's dark 'lamps off' background image and processed it.  Better results could probably be obtained with further fettling, but it shows the 'depixellation' effect well enough.

Original image:
dr_who_lightsoff_original_scale.thumb.png.5b518c826192b44014a684229f5ae70a.png

Processed image:
dr_who_lightsoff_large_scale.thumb.png.c347361b62237c15e7b8190ebd111f32.png

Original image:
dr_who_lightsoff_original_scale_2.thumb.png.243dfc6952b2c59b349f265588d719e8.png

Processed image:
dr_who_lightsoff_large_scale_2.thumb.png.64809d0e6ae8b5871f4243d4ad0432ca.png


EDIT: came back to this, and grabbed an image of an older machine (Super Nudge Gambler) from one of the posts on this site, to see how the process would look with that:

Original image:
super-nudge_gambler_original.thumb.png.16d28f0a2b6423878fff9c82053141aa.png

Processed image:
super-nudge_gambler_scale.thumb.png.df1c80c0977b9041570abf1aae96ea97.png


EDIT 2: grabbed another era of machine from an image from this site, and processed that to see how it would look:

Original image:
wig_wam_original_1.thumb.png.0520434cc093ff75d6aa930f1c36577f.png

Processed image:
wig_wam_scale_1.thumb.png.02d7e45ee80759d1f44ccd4fff8392f6.png


Original image:
wig_wam_original_2.thumb.png.1fe2f04fed80a9ea1a688e83b2b6b67e.png

Processed image:
wig_wam_scale_2.thumb.png.a4eb606abbae462c3f7aaca5ca58ca7a.png


A test of some larger artwork:


Original image:
ghost_buster_original_1.thumb.png.71c0a7e231758a4788f8cc5b741688d2.png

Processed image:
ghost_buster_scaled_1.thumb.png.8f871865186f80900f8403481f4d07f5.png


Original image:
ghost_buster_original_2.thumb.png.b23d759c163a7e30f2d2a8e568b41e4c.png

Processed image:
ghost_buster_scaled_2.thumb.png.bee81fc4a20676d941b24ba4e152f152.png
 

Edited by johnparker007
added another example
  • Like 9
  • Awesome 5

Arcade Simulator
Pre-alpha installer: http://arcadesimulator.net
Known Issues: https://tinyurl.com/yz4uom2e

CPR (Chr-free Patcher for Roms)
Download patched roms so far: https://tinyurl.com/yfwkyc9p
View progress/requests: https://tinyurl.com/yhnu368r

Donation info: https://tinyurl.com/yzvgl4xo

Link to comment
Share on other sites

Hiya there Slasher :)  Yep still do odd bits of scene stuff in my limited free time, just seem to never get enough of it!  I'm well ta, hope you're good too man :) 

  • Like 3

Arcade Simulator
Pre-alpha installer: http://arcadesimulator.net
Known Issues: https://tinyurl.com/yz4uom2e

CPR (Chr-free Patcher for Roms)
Download patched roms so far: https://tinyurl.com/yfwkyc9p
View progress/requests: https://tinyurl.com/yhnu368r

Donation info: https://tinyurl.com/yzvgl4xo

Link to comment
Share on other sites

Hiya A:E :)  Thanks for the info and offer to test :) 

Hey davep180 :)  For various reasons (that I don't want to get into on this thread), we won't know the best way to progress this tech into something usable for a few months.  Something will come of it though - I did a project involving FME layouts in the past, and was always bothered by the issue of low resolution (especially as 4k and 8k monitors are already available).

  • Like 4

Arcade Simulator
Pre-alpha installer: http://arcadesimulator.net
Known Issues: https://tinyurl.com/yz4uom2e

CPR (Chr-free Patcher for Roms)
Download patched roms so far: https://tinyurl.com/yfwkyc9p
View progress/requests: https://tinyurl.com/yhnu368r

Donation info: https://tinyurl.com/yzvgl4xo

Link to comment
Share on other sites

3 minutes ago, johnparker007 said:

Hiya A:E :)  Thanks for the info and offer to test :) 

Hey davep180 :)  For various reasons (that I don't want to get into on this thread), we won't know the best way to progress this tech into something usable for a few months.  Something will come of it though - I did a project involving FME layouts in the past, and was always bothered by the issue of low resolution (especially as 4k and 8k monitors are already available).

With regards to the other project, I believe I still have all the files on my server if you ever need anything from it or wanted to kick it back up again

  • Like 2

GO ALL THE WAY

Link to comment
Share on other sites

47 minutes ago, slasher said:

With regards to the other project, I believe I still have all the files on my server if you ever need anything from it or wanted to kick it back up again

Now what the bloody hell are you two up to, what project, sounds exciting?

  • Like 1

Zippy🤐 from Rainbosays "Still waiting on an apology but I won't hold my breath 😗"

 

Link to comment
Share on other sites

It was JP’s amazing work with mame and fruit machine emulation.  He enabled me to create the first Deal or No Deal machine to run.   I only built the layout JP did some impressive under the hood stuff.  He also created a tool that could convert any mfme layout to mame.   A shit ton of work, that he devoured lol ;)

Maybe a section for that but I’m not sure mame is the thing going forward ?

J

  • Like 4
Link to comment
Share on other sites

5 hours ago, slasher said:

With regards to the other project, I believe I still have all the files on my server if you ever need anything from it or wanted to kick it back up again

Cheers Slasher :)   I do have the work backed up (though not the website backend), and good to know there's more copies out there!

Just had a little play with some reel symbols as they were always low res (I don't know if that's changed with newer layouts):

These are purely upscaled:
 

reelsym_original_1.png.0e0dd25b6defb8af14221c810aba94aa.pngreelsym_scaled_1.png.b3bdb773ea866b26e6f97a5dbf781765.png

reelsym_original_2.png.1bb5dd3de63294cdfefe4e8dc37b5b5e.png
reelsym_scaled_2.png.0f2536afba244502ad4d40fd80c9ab13.png

reelsym_original_3.png.6a0835a8b0a9c6843b9219874e90dc16.png
reelsym_scaled_3.png.7754359a925c540bf6dcf2f08f20f427.png

These had a couple of extra stages:
 

reelsym_original_4.png.be3976de43c1f82348f52719c964584a.png
reelsym_scaled_4.png.e6e56d06f8954a4c830a5c5b3fe6f9c7.png

reelsym_original_5.png.d93703d9cabcbf26ff203e38a886f5d8.png
reelsym_scaled_5.png.e5dcd21bcd670a64850e43db2140b8ad.png

reelsym_original_6.png.d30ba887c861b740dc23b6e8a32c181b.png
reelsym_scaled_6.png.d95097ee03046e1bde9585f8bb0e9688.png

For the upscaling, I'm using the waifu2x library (setting 16x 0n), and for the bars above I ran an unsharp mask and saturation post pass.
 

 

 

Edited by johnparker007
  • Like 2
  • Awesome 1

Arcade Simulator
Pre-alpha installer: http://arcadesimulator.net
Known Issues: https://tinyurl.com/yz4uom2e

CPR (Chr-free Patcher for Roms)
Download patched roms so far: https://tinyurl.com/yfwkyc9p
View progress/requests: https://tinyurl.com/yhnu368r

Donation info: https://tinyurl.com/yzvgl4xo

Link to comment
Share on other sites

2 hours ago, johnparker007 said:

Cheers Slasher :)   I do have the work backed up (though not the website backend), and good to know there's more copies out there!

Just had a little play with some reel symbols as they were always low res (I don't know if that's changed with newer layouts):

These are purely upscaled:
 

reelsym_original_1.png.0e0dd25b6defb8af14221c810aba94aa.pngreelsym_scaled_1.png.b3bdb773ea866b26e6f97a5dbf781765.png

reelsym_original_2.png.1bb5dd3de63294cdfefe4e8dc37b5b5e.png
reelsym_scaled_2.png.0f2536afba244502ad4d40fd80c9ab13.png

reelsym_original_3.png.6a0835a8b0a9c6843b9219874e90dc16.png
reelsym_scaled_3.png.7754359a925c540bf6dcf2f08f20f427.png

These had a couple of extra stages:
 

reelsym_original_4.png.be3976de43c1f82348f52719c964584a.png
reelsym_scaled_4.png.e6e56d06f8954a4c830a5c5b3fe6f9c7.png

reelsym_original_5.png.d93703d9cabcbf26ff203e38a886f5d8.png
reelsym_scaled_5.png.e5dcd21bcd670a64850e43db2140b8ad.png

reelsym_original_6.png.d30ba887c861b740dc23b6e8a32c181b.png
reelsym_scaled_6.png.d95097ee03046e1bde9585f8bb0e9688.png

For the upscaling, I'm using the waifu2x library (setting 16x 0n), and for the bars above I ran an unsharp mask and saturation post pass.
 

 

 

Does this mean you can enhance flyers which are poor?

ezgif-6-228f2c936d48.gif

 

Link to comment
Share on other sites

Very interesting, and ideal for MFME, especially as we can not always find high quality images of older machines. 

Definitely something positive and exciting for the future:). 

Just looking at waifu2x library (https://deepai.org/machine-learning-model/waifu2x). Are you using a stand alone program, or the deepai server?

 

Just thought....This would be fun to try with grainy UFO pics.

  • Like 1

Treat every day like your last, because one day it will be!

Link to comment
Share on other sites

Hey guys :) 

I had been using a less user-friendly command line lib with a custom batch file for recursive runs, but I've found a more user friendly way so the non-coders can get in on the upscaling action straight away; this has a GUI.  I'm looking forward to seeing what you guys upscale! ;) 

Note that for the [BAR] reel symbols above, they benefitted from some post processing steps (I think it will be best to always perform these after the upscale stage is complete).

The version including a GUI is here:

https://github.com/AaronFeng753/Waifu2x-Extension-GUI

I think a tool could be developed to automatically upscale the massive back catalog of existing MFME layouts, but that's a conversation for a few months time.  This would potentially open up very detailed textures for a 'photorealistic' 3D renderer (generated from 2D layouts)... allowing for VR arcades (with a non-headset mode), so one could reel peek etc, and the visuals would stay sharp even when just the reels and surrounding glass are taking up a lot of the screen.

Also new layouts could be hand-constructed from a lower resolution flyer/photo/scan that has been upscaled/processed, to provide sharper graphics in general.

Have fun :)

For a crude text I scaled my browser rendering down to 25% and took a screengrab of my post above - view this below at 100% zoom in your browser, and it should show the sharpness improvements more clearly at a closer scale to what you'd see when running a layout on a 1080p screen (which I am using). You would see better improvements with a 4k display and viewing the original reel images further up.

image.png

Edited by johnparker007
  • Like 3
  • Thanks 1

Arcade Simulator
Pre-alpha installer: http://arcadesimulator.net
Known Issues: https://tinyurl.com/yz4uom2e

CPR (Chr-free Patcher for Roms)
Download patched roms so far: https://tinyurl.com/yfwkyc9p
View progress/requests: https://tinyurl.com/yhnu368r

Donation info: https://tinyurl.com/yzvgl4xo

Link to comment
Share on other sites

16 hours ago, johnparker007 said:

For the upscaling, I'm using the waifu2x library (setting 16x 0n), and for the bars above I ran an unsharp mask and saturation post pass.

Thanks for the info. I had a play with the 64bit UI but ran out of time (Visitor). Just wondering which waifu engine you had running, and if you could maybe explain a bit more about the post process a bit. Thanks:) 

Treat every day like your last, because one day it will be!

Link to comment
Share on other sites

Bear with me, I'll knock up a quick guide with some screenshots as this GUI version makes it very straightforward - then everyone can start using this for fun or even building/improving layouts straightaway (albeit manually).

Edit - ok that's done - see below :) 

 

GUIDE TO INSTALLING AND USING WAIFU2X GUI TO UPSCALE IMAGES USING AI


(1) Download latest stable build Installer from this link: http://d0.ananas.chaoxing.com/download/f2addaafa64f1bd0a7dc0eb7eeb74d1e?fn=Waifu2x-Extension-GUI-v2.56.52-Win64

(note the link above may expire - then visit: https://github.com/AaronFeng753/Waifu2x-Extension-GUI and scroll down to find the link to latest stable Windows build)
image.png.8e5611a90cabb5c89a8aaa867ba18983.png

 

(2) Then extract the downloaded 7z to a folder on your desktop (you will need to install 7zip if you don't have it, it's free: https://www.7-zip.org/ ) image.png.9220176598e9df3801a0f6254e3da77b.png



(3) Open the folder (A) on your desktop and launch the program (B)
image.png.09cde1338921da4a488844731fe3c657.png



(4) Have an image to hand to upscale, and drag and drop that image onto the area indicated in the waifu2x window (here I'm using an image from an old converted MAME layout I dug out of my old project backup files)
image.thumb.png.34e741e6faef2af84bcd505e4c70f5b7.png



(5) You should now see your file details in the top area (A).  Now set the values in the area (B) as shown (users with slower PCs may wish to reduce the scale from 16 to say 2-4 if they want quicker results and a smaller scale; also noise can be set to -1 if the source image is very clean)
image.png
 


(6) Now click Start (A) and the image will be upscaled and saved with a file suffix in the same folder as the source image (B) ... (in my case desktop to make this guide clearer)
image.png

Open up that new file and zoooooooooom in!  ;)

Edited by johnparker007
  • Like 5

Arcade Simulator
Pre-alpha installer: http://arcadesimulator.net
Known Issues: https://tinyurl.com/yz4uom2e

CPR (Chr-free Patcher for Roms)
Download patched roms so far: https://tinyurl.com/yfwkyc9p
View progress/requests: https://tinyurl.com/yhnu368r

Donation info: https://tinyurl.com/yzvgl4xo

Link to comment
Share on other sites

19 hours ago, infection said:

Does this mean you can enhance flyers which are poor?

I hope so :)  (the AI might run into problems with moire/rosette artifacts inherent in the printing process, prob depends on scan resolution to original dpi ratio).  That said it'll probably be perfectly fine - I have no flyers to test, though I've put a full guide above that should help get you going for simple manual AI upscaling of images.

 

5 hours ago, Amusements said:

Thanks for the info. I had a play with the 64bit UI but ran out of time (Visitor). Just wondering which waifu engine you had running, and if you could maybe explain a bit more about the post process a bit. Thanks:) 

The post process stuff - I only had to do that to those BARs, but it's standard Photoshop / gimp stuff.  Unsharp mask is a good tool for sharpening images (it's not AI upscaling though!), and saturation is just increasing the colour saturation of images that look a little 'washed out'.

  • Like 5

Arcade Simulator
Pre-alpha installer: http://arcadesimulator.net
Known Issues: https://tinyurl.com/yz4uom2e

CPR (Chr-free Patcher for Roms)
Download patched roms so far: https://tinyurl.com/yfwkyc9p
View progress/requests: https://tinyurl.com/yhnu368r

Donation info: https://tinyurl.com/yzvgl4xo

Link to comment
Share on other sites

1 minute ago, johnparker007 said:

I hope so :)  (the AI might run into problems with moire/rosette artifacts inherent in the printing process, prob depends on scan resolution to original dpi ratio).  That said it'll probably be perfectly fine - I have no flyers to test, though I've put a full guide above that should help get you going for simple manual AI upscaling of images.

 

The post process stuff - I only had to do that to those BARs, but it's standard Photoshop / gimp stuff.  Unsharp mask is a good tool for sharpening images (it's not AI upscaling though!), and saturation is just increasing the colour saturation of images that look a little 'washed out'.

Ok mate I've tested it on image of Jugglin jackpots and the image looks good for a dx 

ezgif-6-228f2c936d48.gif

 

Link to comment
Share on other sites

2 minutes ago, infection said:

Ok mate I've tested it on image of Jugglin jackpots and the image looks good for a dx 

That was fast!  The ink on my guide I just posted hasn't even dried yet :)  Glad you got it going :)

  • Like 1
  • Haha 1

Arcade Simulator
Pre-alpha installer: http://arcadesimulator.net
Known Issues: https://tinyurl.com/yz4uom2e

CPR (Chr-free Patcher for Roms)
Download patched roms so far: https://tinyurl.com/yfwkyc9p
View progress/requests: https://tinyurl.com/yhnu368r

Donation info: https://tinyurl.com/yzvgl4xo

Link to comment
Share on other sites

 Share

×
×
  • Create New...