a super-simple gui to slide old photographs into TODAY
TimeSlide is a prototype concept to balance the ease of applying machine-learning colorizing and up-sampling of old photographs without having to possess coding expertise or uploading your photographs to an online service. It is inspired by my desire to provide an easy-to-use offline option for my mother with her older family and ancestral photos. The goal is to give the people a secure and easy way to make your old photos look like they were taken today. The application name is derived from the title of an episode of the amazing British sitcom, "Red Dwarf," wherein timeslides provided much more interactive features of old photographs.
TimeSlide is really just an attempt at pretty packaging of the hard work by others--e.g., the deoldify project, torch developers and all the other selfless contributors to both the open source and free software communities that provide enabling technologies.
Importantly, TimeSlide targets macOS. Currently, since it is based solely on python modules, you could certainly bundle a Windows application. But no support on that procedure is provided herein (though you're welcome to figure it out yourself and submit a PR). I haven't gone through all licenses yet and so do not provide a "release" here. But the instructions for bundling/packaging a distribution yourself is provided herein.
- macOS (tested with Monterey 12.0.1)
- brew
- python 3.9
In macOS, install homebrew. Then, use it to install Python 3.9.
brew install [email protected]
Link it in your path with
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
Ensure that the python3
command is correctly inked to the homebrew version with
which python3
Also verify here that it is python 3.9, or else just run python3 --version
to confirm.
Next, run the bootstrap file which will clone deoldify, download the colorizing models, install a few packages through homebrew, and install all python requirements in a virtual environment. Edit it if you desire or require, then run
source bootstrap.sh
After activating the python virtual environment (source venv/bin/activate
), simply run the python script:
python timeslide.py
Since the whole point of TimeSlide is ease of use, we require a solution for bundling the app that can be distributed to others. To do this, first open the file timeslide.spec
and ensure that the path to your homebrew (Cellar'ed) version of libpng16.16.dylib
is correct (slight modifications may be necessary depending on version number.)
Next, in terminal, run:
source bundle.sh
With this, pyinstaller will bundle the app, including all necessary python modules, dynamic libraries, and machine learning models (pretrained weights). It will be bundled into a single .app
bundle (as well as a binary executable) under the dist
folder. Additionally, the bash script will copy over the icon files into the .app
file. I recommend running the binary executable first to troubleshoot, as you'll be able to see any errors that occur.
Please note that distributing the application to others will require that they enable unidentified developer apps (one-time procedure) to run on any somewhat recent versions of macOS. This can be done by providing those users with the following instructions.
- Press
⌘
+SPACEBAR
. - Type
term
. When the Terminal.app shows, click it (or hitENTER
). - In the window, type
sudo spctl --master-disable
(note double hyphens beforemaster
), hitENTER
. - Enter password as required, hit
ENTER
. - Open System Preferences.
- Click "Security and Privacy." Make sure you're on the "General" tab.
- Click the lock at the bottom left, and enter password.
- Under "Allow apps downloaded from," ensure that "Anywhere" is selected.
- Close System Preferences and double-click the TimeSlide app to run.
- added menu bar
- added license window
- added about window
- complete rewrite of gui in pyqt6
- enable URL loading
- removed enhancement as implementation was far too slow
- change license from MIT to GPLv3
- updated deoldify models to current urls
- accepted dependabot PRs for various vulnerabilities
- updated several module versions for security and compatibility
- default window width enlarged for better viewing
- image now maintains aspect ratio correctly in canvas
- resizing window now resizes canvas and image
- dropdown menus now have correct background color
- removed many unncessary python modules from bundle
- window now will start in center of the screen
- app will no longer fail when user cancels load file
- new enhancement frame (including tooltips)
- enhancement allows for 4 models, 3 multiplicative factors each
.jpg
now default when saving- status updates now provided during procedure
- tooltips now help guide user
- blurry text in macOS resolved
- dedicated icon
- stable model + artistic model both included
- app can now be fully bundled for macOS
- first working version
- colorize-capable (and optional)
- render factor selection on colorize
- load from local file or url
- gui layout to guide user
If you just want to test out TimeSlide but don't have black-and-white photos available, here are some nice resources: