Skip to content

MSc

NFT Collections Generator

Training GANs on two real 10,000-image NFT collections to generate and upscale new artwork, including the attempt to blend the two, which did not work and is written up as not working.

Nov 2022Machine learningWeb3

A computer-vision course project: scrape two real 10,000-image NFT collections, train a DCGAN on each to generate new artwork at 64×64, then upscale with an SRGAN. Then try to make a model that blends the two collections into one.

Trained on
Bored Ape Yacht Club and ELRONDAPESCLUB, 10,000 images each
Pipeline
DCGAN → denoise → SRGAN 4× → denoise
Training
1,000 epochs, about an hour per collection
Repository
VincenzoImp/nft-collections-generator
VincenzoImp/nft-collections-generatorDCGAN and SRGAN pipeline for generating and upscaling NFT collection artwork.Jupyter Notebook

What it was

The two collections were pulled from where they actually live – the Apes from IPFS, the Elrond collection from its chain API – and each trained a separate DCGAN, a hundred-dimensional latent vector through five transposed-convolution layers to a 64×64 image. Generated images then go through denoising, a four-times SRGAN upscale to 256×256, and denoising again.

The comparison between the two collections is the useful part. The Apes have wildly varied backgrounds, and the model learned the palette without learning that the colours are mutually exclusive: it knows blue and green are both plausible, not that a background is one or the other. The Elrond collection’s backgrounds are uniformly dark, and it trained faster and better on identical settings. Only that one was considered good enough to be worth training the upscaler on.

The blending experiment used one generator against two discriminators, each with its own dataset, with the generator’s loss averaged between them. The presentation is blunt about the outcome: it does not work, and a DCGAN is the wrong architecture for it. StyleGAN is the one that does this.

What I took from it

The dataset decided the result more than the architecture did. Two collections, the same model, the same thousand epochs, and one trained cleanly while the other learned a palette instead of a picture, because of how much its backgrounds varied. That is a cheaper thing to check than a hyperparameter sweep, and I did not check it first.