This repo contains a project to generate social media content by leveraging Generative Adversarial Networks
Instagram: https://www.instagram.com/socialganetwork/
Initially the plan was to have a full end to end process automated through use of instagrams API. Naively I did not expect their API to be so locked down and have had to abandon many elements of my originalplans, at least in the short term.
I had originally envisaged the finished project having a process such as below:
- Programatically choose a hashtag
- take biggest trending hashtag
- allow community engagement - voting on hashtag by commenting on images on the account - take most requested
- Scrape the top ~10k from that hashtag
- Train Model
- Generate new images from G - 9 to create an instagram "grid" for each run
- Automatically upload with hashtag, details of the methodology and some metrics of the image and run
A number of the above elements have had to be de-scoped or de-priortised - at present:
-
A hashtag is determined by the user (me)
-
The batch of images is downloaded using a 3rd party app 4K Stogram
-
Upload is performed manually using a mobile browser emulator (uploading from desktop is prohibited)
-
Each run so far is a copy of the same notebook with input parameters modified
-
Garbage In/Garbage Out
- I believe a major blocker for generating better images is the heterogeneity of instagram content with a particular hashtag. Hashtags are often "spammed" and attached to images which they are not directly relevant to.
- Examples:
- Ways around this would be
- Attempt to find choose suitable, homogenous hashtags, manually chosen to be quite niche
- alternative sources of images (such as google images)
- use some other technique to determine which images are unlikely to belond in your set of training images before training the GAN.
- I guess part of the objective of "predicting" instagram content should naturally include the influence of a hashtag's "abuse" and this will lead to more abstract impressions of images from a topic/hashtag
- Incorporate laplacian pyramid approach
- Filter images before training
- Train/output higher resolution images
- AI Upscaling of images
- Twitter / NLP Equivalent
A large proportion of the current code is taken from the following site: DCGAN Tutorial — PyTorch Tutorials 1.6.0 documentation