/Manga-Colorizer

Bring mangas to life!

Primary LanguagePythonMIT LicenseMIT

Manga-Colorizer

Introducing Manga-Colorizer, a tool that brings your mangas to life!

Demo Video - PC:

DEMO VIDEO

Demo Video - Android:

TODO

New Features:

  • Now works seamlessly on any website.
  • Blazingly fast image colorization on the fly.
  • Intelligent and dynamic colorization.
  • Super-resolution upscaling for enhanced image quality.
  • Additional settings for more customization options.
  • Organized caching into a dedicated folder for reuse.
  • Options to display original, colorized version, or both.
  • Force colorization.

Notes:

  • Old legacy project can be found here.
  • Follow any one of the server and one of client usage instructions.

Server Usage Instructions | Local Hosting:

  1. Local hosting is recommended if you have access to a cuda GPU.
  2. Clone or download this repository as .zip and extract.
  3. Download the Generator weights and move it to Backend/networks folder.
  4. Install python and setup pytorch if not already done.
  5. In the Backend folder, open a command prompt, and run:
    • For installing necessary modules: pip install -r requirements.txt
    • For starting the server: python app-stream.py
    • Backend should be running on localhost (https://127.0.0.1:5000) and Private IP (https://x.x.x.x:5000)
  6. Next, follow any of the 'Client Usage Instructions'.

Server Usage Instructions | Online Hosting:

  1. Online hosting is recommended if you don't have access to a cuda GPU or you do not want to keep your system/server on, while reading on a mobile.
  2. Make a kaggle account and verify using phone to get ~30hrs of weekly GPU.
  3. Make an ngrok account and get your auth token from here
  4. Go to this notebook and click 'Copy & Edit'
  5. Set the accelerator as GPU P100 under notebook options if not already selected.
  6. Replace the your_ngrok_auth_token in '!ngrok config add-authtoken your_ngrok_auth_token' in the code with the auth-token in Step 3.
  7. Next choose 'Run All' from the menu to run the notebook.
  8. In a few minutes you should see some output from the last running line (!ngrok http 5000) with some urls.
  9. Click on the one which looks something like https://314-1342-142-43.ngrok-free.app.
  10. Alternatively, visit here to get the running sessions.
  11. On the tab that opens, click visit site.
  12. You should see 'Manga Colorizer is Up and Running!'
  13. Now you can follow any of the 'Client Usage Instructions' below, including step 0, but with this API URL
  14. You may also now click 'Save Version' on the notebook, then 'Save and Run All (Compile)' to keep the notebook running (it will re-run) even after you turn off your system.
  15. After a few minutes, visit here to get the running sessions and get the new API URL and use that for the client.

Client Usage Instructions | PC | Firefox:

  1. Open the server URL:
  2. Open the firefox debugging page and click 'Load Temporary Add-on'.
  3. Navigate to the Frontend-Firefox directory and choose manifest.json.
  4. If the extension loads correctly, you will see it's settings page.
  5. Paste the server URL, in the extension's 'API URL' field and press 'Test'.
  6. If you see 'Manga Colorizer is Up and Running!', then its working!
  7. Close all these necessary tabs now and open a black-and-white manga.
  8. Open the Extensions menu (looks like a puzzle piece).
  9. Then right-click 'Manga Colorizer' and select 'Always allow on ...' also 'Pin to Toolbar'
  10. Click on the 'Manga Colorizer' extension to open its settings as a popup.
  11. Click the 'Colorize' button, that should appear next to 'Next chapter'.
  12. Press the 'Add ...' button to add the site to the list of Manga Sites, so it automatically colors images from now on.
  13. Press 'Colorize!' and enjoy!.
  14. These steps have to be repeated everytime firefox is started.

Client Usage Instructions | PC | Chrome/Brave/Any-Chromium:

  1. Open the server URL:
  2. Goto chrome://extensions/ webpage, turn on developer mode, and click 'Load Unpacked'.
  3. Navigate to and select Frontend-Chrome folder. Manga Colorizer settings should open in a new tab.
  4. Paste the server URL, in the extension's 'API URL' field and press 'Test'.
  5. If you see 'Manga Colorizer is Up and Running!', then its working!
  6. Close all these necessary tabs now and open a black-and-white manga.
  7. Open the Extensions menu (looks like a puzzle piece) and click the pin next to 'Manga Colorizer'.
  8. Click on the 'Manga Colorizer' extension to open its settings as a popup.
  9. Press the 'Add ...' button to add the site to the list of Manga Sites, so it automatically colors images from now on.
  10. Press 'Colorize!' and enjoy!.

Client Usage Instructions | Android | Firefox Nightly:

  1. First, goto 'Frontend-Firefox' folder and zip all the files.
  2. Select all the files, then right-click, Send to, Compressed (zip) folder.
  3. Rename this zip file to 'Frontend-Firefox.zip' and move it to your android device.
  4. Install Firefox Nightly browser on android from google playstore.
  5. Open settings, scroll down and select 'About Firefox Nightly'.
  6. Keep Tapping on Firefox logo, until the Debug menu is enabled.
  7. Go back and select Secret settings, and choose to install Add-on from file.
  8. Browse for the 'Frontend-Firefox.zip' file that you uploaded to you device.
  9. Follow Step-0 of 'Client Usage Instructions | PC | Firefox' but use either Private IP or ngrokURL.
  10. Open any black-and-white mange page.
  11. Tap settings menu (3 dots), select Add-ons, select the colorizer extension.
  12. Input the server URL in the 'API URL' field.
  13. Add the manga website in the list.
  14. Press 'Colorize!' and enjoy!.
  15. Unfortunately, only Step-8 has to be repeated at every chapter because of permission issues, so Kiwi Browser is recommended.

Client Usage Instructions | Android | Kiwi/Any-Chromium (\w extension):

  1. First on PC Chrome, go to extension settings and click 'Pack extension' on top-left.
  2. Click browse, then navigate and choose the Frontend-Chrome folder and click 'Pack extension'.
  3. This will create a 'Frontend-Chrome.crx' file. Move this file to your android device.
  4. Install Kiwi browser on android from google playstore.
  5. Open browser settings menu (3 dots), select 'Extensions', then select '+(from .zip / crx)' and browse for the 'Frontend-Chrome.crx' file.
  6. Toggle on the extension and accept the permissions.
  7. Follow Step-0 of 'Client Usage Instructions - PC - Chrome' but use either Private IP or ngrokURL.
  8. Open any black-and-white mange page.
  9. Tap settings menu (3 dots), scroll down, select the 'Manga-Colorizer' extension.
  10. Input the server URL in the 'API Base-URL'.
  11. Add the manga website in the list.
  12. Press 'Colorize!' and enjoy!.

Credits: