This repository contains code for Mastodon bots that publish historical photographs colorized using the DeOldify algorithm.
This code is currently used to publish two bots that can be followed using any Mastodon or Fediverse client:
- Väri-Signe ("Color Signe") at https://botsin.space/@varisigne using photographs taken by Signe Brander
- Väri-Timiri ("Color Timiri") at https://botsin.space/@varitimiri using photographs taken by Ivan Timiriasew
The bots are in two separate files with almost identical code:
These scripts are intended to be triggered using cron.
The main dependencies are Mastodon.py and Requests. See requirements.txt
The source images were collected via the Finna API using the scripts:
The JSON metadata records for the images are in finna-data/finna-records-signe.jsonl and finna-data/finna-records-timiri.jsonl.
The images were colorized using the DeOldify algorithm under Google Colab.
I used the example Colab notebook and modified it to colorize all images specified in the JSON metadata records and store the colorized images in Google Drive. The notebook can be found at finna-data/Varisigne_ImageColorizerColab.ipynb.
Then I downloaded the colorized images from Google Drive to the server running the bot.