Use machine learning to generate a new Oxford college crest design based on a given prompt.
This is a project built for Hack Cambridge Spyder Lite. Check our Devpost here.
College puffers are an essential part of the Oxbridge experience. Many students wear puffers showing their college's crests as a way of expression. But what if your college's crest is just too ugly?
In this project, we created a machine learning program which is able to generate a college crest based on a given prompt, in order to make the most unique and fashionable college puffer.
Dreambooth stable diffusion was used to train a text to image generation model using Oxford University's 44 college crests.
This was combined with a ControlNet made by lllyasviel on Hugging Face to restrict the shape of the image generation into a shield crest shape.
Further efforts were made using OpenCV in order to automate the detection and replacement of crests in photos of college puffers, although it is yet to be functional.
Run the Jupyter Notebook OxCrest.ipynb following its instructions.
Make sure to login using a Hugging Face token for model access, which can be obtained for free with a Hugging Face account.
The prompt may be changed for different results.
prompt = "a photo of an oxford college crest that includes a shape of a cat"
Using the prompt above, example results have been generated.