Saturday, May 2, 2020

Afro Futurism 2021


Introduction
It is not often that people create work from an African perspective in machine learning. On my research journey, I bumped into Mimi Onuoha, a Nigerian American AI Artist whose work focuses on social relationships and power dynamics behind data collection (Onuoha, 2020). A Series titled Missing Data highlights the lack of representation amongst data collection. Onuoha suggests that those who have the means to collect and use data lack the incentive to be objective and diverse. She goes on to say ‘Spots that we’ve left blank reveal our social biases and indifferences’(Onuoha, 2020). This led me to think about what we choose to highlight, note, save, digitize, draw attention to and the likes (Dzimwasha, 2014; Emejulu, Sobande, 2019). Meanings and importance are assigned to things and given a place in society, usually by those in power. For many Africans, both in the diaspora and on the continent, many communities lack the resources 
to attempt to counter act biases that may occur (Onuoha, 2020). With this, we must acknowledge that over time technology has become increasingly more accessible opening door for more diverse contributions (Dzimwasha, 2014; Emejulu, Sobande, 2019). But, the same gap Onuoha speaks of in data collection is also Artistic AI creations, the broad direction my project follows (Dzimwasha, 2014; Emejulu, Sobande, 2019). I set out to create a tool to aid in the creation, digital archiving, presenting and meaning-giving of African Dutch Wax Patterns for cloth design. Admittedly, I just wanted to see the possibilities of what could be created, but I didn't realise how profound and exciting it would be to interact with my tradition on this level. The history of Dutch wax and how and why it is the traditional fabric for many African countries is unsettling but encompassing of how some biases play out (Wikipedia, 2020). Originally made for the Dutch, imitation wax-resist fabrics were created as a cheap option to penetrate the batik market (Wikipedia, 2020). When the Dutch wanted nothing to do with the cheap imitation fabrics, they decided to offload them on the African continent where they embraced it like no other (Wikipedia, 2020). So much so, all these years later it Dutch Wax is synonymous with parts of African traditions (Wikipedia, 2020). To merge what is seen as primitive and something seen as futuristic was important. 

A Screen shot from Onuoha’s GitHub Repository:  


Fashion And AI
In the western world, there are many Artists and Designers using machine learning in Fashion to generate an inspirational machine assistant (Luce, 2019). AI tools and devices are currently being used in the fashion industry to create fashion model images, fabric designs, and clothing (Dennis, 2020). Fashion Design applications are used to bridge the gap between human and the machine (Wickramarathne et al. , 2019). Generative models can create images of garments, which provide an educated jumping-off point if your dataset is as clean as possible(Luce, 2019). These models have no understanding of shape or construction, they are only able to identify patterns in data they are given (Luce, 2019). Done with different end goals in mind, some use it to generate ideas that humans couldn't possibly come up with and others use it to generate new commercial ideas that will shape today's fashion trends.

Amazon developed an AI Fashion Design tool to develop clothes for their brand and give their customers an online fitting room (Wickramarathne et al. , 2019). In a generative adversarial network (GAN), one of the neural networks generates images based on patterns it recognizes in the input dataset, and the other neural network classifies those images as real or fake (Luce, 2019). They developed a GAN that does a number of things; monitor popular social media images and data to classify if an image is fashionable or not, generate items to match clothing descriptions to aid in refining searches, And generate new designs similar those that are trendy (Wickramarathne et al. , 2019).

Acne, a Fashion Brand, collaborated with Multimedia Artist Robbie Barat to create a collection of garments for their Men’s Fall/Winter 2020 collection (Papagiannis, 2020). Fashion runway images from the Acne archives were fed into a machine learning model Barrat (Papagiannis, 2020). Reminded that GANs do not know about form or shape, the algorithm mistakenly confused noise in images with clothing to produce coats with a curved opening at the bottom front, and garments twisted around the body (Diderich, 2020; Papagiannis, 2020).

Pinar Yanardag and Emily Salvador The designers at Glitch ai used ai to come up with clothing design that is not trend-led, instead, they sought to be inspired by the weirdness and use this to make silhouettes and shapes that people have never seen before. They collected (and still are collecting) vintage sketches from old fashion archives. The result was unexpected and gained traction 
Glitch ai, 2020). Eventually leading to the pair selling their creations(Glitch ai, 2020).


Trials and Tribulations 

I used a range of Machine Learning software and tools before settling on Google Colab. I started with the ML5.js environment that works in the web browser to implement a DCGAN on their sample dataset but the generated images were small and very pixelated. Also, I had no idea how to insert my own dataset as it required a JSON object called manifest.json.

I decided to use my laptop to run python code somehow but after hours of half installing things I realised that my laptop is Windows-32 bit and Python needs 64. This was the beginning of a frustrating journey trying to decipher code and navigate errors in order to successfully implement code.

Moving to Google Colab, as it has a Built-in GPU, I explored DCGANs using a random dataset that came with the system.
initially ran into problems as Colab shuts off due to inactivity and that particular code did not handle picking up where it left off well.

I consulted my teacher and he suggested using the Google Cloud Platform but after a few failed attempts I settled on RunwayML. This was a great option as I can leave my laptop inactive and have the training continue until finished. I played around using the graffiti dataset to generate new images just so test as this was the closest available option to the patterns that I wanted to train on. This then gave me the confidence to start working on my African Print dataset. After 6 hours of training using the StyleGAN2 model for 4000 steps, I was left with faux African prints that were softer and not as detailed as the originals.

Images Generated by RunwayML (last sample image produced):




I thought it would be a fun idea to use the Pix2Pix model to turn sketches into real images through the web browser using the cat2sketch framework. I found code on Github that implemented the model but couldn't get it to work in Colab. I managed to train my dataset using the command line and the spell GPU. I used a GitHub repository to create a dataset suited for Pix2Pix that consisted of regular images alongside uncanny versions of the same image(the result was 526 px x 213px). It took 5 hours to train and I was excited to put my trained model in the web browser. This was also an unsuccessful task, I spent hours trying to figure out how to get the web browser to run the code, I eventually found out that the server I was running the code on was incorrect and I need to add ‘localhost:800’ to my URL in order to access the .pict file. With this feat, I switched models from the sample to mine only to find out that the sketch was producing black and grey foggy clumps. I then went back to my original idea of implementing StyleGAN2 but in Google Colab seeking crisper results.  

Images from the Pix2Pix dataset (526 px x 213px)  :
                                                                          
                 
Implementation
I used a Google image extension called All Images Download to scour Google for images for both datasets. Finding images for the print dataset was easy as there was a pleather of images to choose from. I just had to decide if I wanted to choose African prints that were similar or if I wanted to include a varied aesthetic of prints for a surprise. Looking at the graffitI dataset from RunwayML I noticed it was quite varied so I decided to make it easy and collect 2100 images of African/African looking prints.

Examples of the African Print Dataset:


Examples of the Clothing Dataset: 







For the clothing dataset, I used the same Google extension but getting images was much more tedious. The clothing images all had backgrounds and I didn't want this to interfere so I used an online background removal website to remove the backgrounds of some images that were far too busy but not the plainer, near while backgrounds. As a result of the transparency, the background of the images turned black when I used the dataset-tool python script to resize the images to 1024px x 1024px. But I assumed this would be fine as long the black backgrounds were free from obstruction.

Images Generated From Google Colab (last sample image produced):


I assumed that a longer train would give me more or different results to the RunwayML model so I used the Google Colab. The StyleGAN2 model on Google Colab was written by Dereck Shultz and found on a Youtuber named BustBright page. With his code l was able to train for 12 hours in total before there was not much differentiation in the samples images generated. I was then able to generate images using a random seed of my choice. With timing in mind, I decided to train my African clothing dataset on the Google Colab model for 16hours in total before Google Colab stopped it. The 16 hours was done in 2 batches both shutting off due to lack of GPU memory. This was okay as the sample images generated were quite detailed and interesting enough to draw from. 

Clothing Images Generated from Google Colab Training (last sample image produced):

Conclusion
I realise my privilege of owning a laptop, having access constant to the internet/ electricity and taking part in masters in Computational Arts. 
I also realise working with print can be seen as unworthy or frivolous knowing the work that needs to be done further connecting Africa with tech. But set out wanting to somehow bring my specific viewpoint and heritage to my work. Use my privilege, access and resources to follow in the footsteps of Onuoha creating work that speaks to the lack of diversity whilst representing me and the likes.

My understanding of GANs, what this meant or what this entailed was unbelievably minuscule. I thought the word GAN had something to do with the internet connection. When my tutor mentioned I should look into artists and GANs I immediately brushed it off not knowing how fascinating (and frustrating) the rabbit hole can be. Now at the end of this project, I have achieved this very broad goal of generating images to inspire a collection of clothes designed for the African ready to wear market. Not knowing how to code in python did make it difficult at various points throughout. I had never even looked at Python code let alone used the terminal to run a Python script. With so many environments to choose from, I didn't know what environment would be best. So with that being said, I think the project has been successful and I enjoy looking at the results.

If I had more time I would be more specific with the clothing dataset. I would make the background all black or all white. I knew a busy background would interfere but I was naive or too relaxed on the extent to which that would mess with the results. I would also put effort into making sure the view of the images are as similar as possible, making sure the heads and toes and in similar positions in every picture so the portions are kept aligned. Otherwise, the mix of views are taken into consideration for better or for worse. Even further I would eventually like to print the patterns on fabric for a scarf on a t-shirt. I would also reinvigorate the Pix2Pix web browser exploration as my knowledge has grown vastly. Inspired by Scott Eaton, an American artist, I would like to consider working with pattern on the body. Creating sketching in real time that are painted and filled in by the Neural Network. In hindsight, I might have trained the model from one side(A) to one side(B) wrong and that interfered with the transferring of the sketch to canvas rendering. Or the dataset I used was too dirty to produce a good enough result and recognise sequences.

In the future I would like to look into implementing the GAN Zalando uses that puts clothing onto models. The research in the paper Generating High-Resolution Fashion Model Images Wearing Custom Outfits is said to help visualise an outfit on a human body. The possibilities are endless with this type of research. Especially now as we are in quarantine and social distancing measures have been put into place. Many fashion retailers and companies may find it hard to staff a photoshoot in the current climate without breaking these rules. This research can help. If clothes can be put on models using machine learning then companies can keep clothing on models at all times as opposed to on hangers or railings. It will keep the continuity of the web pages taking into account that customers feel more comfortable buying clothes that they can see on a body as it makes it easy to visualise it on themselves. In turn, it could possibly reduce the costs spent on photoshoots and the number of times a photoshoot takes place in any given year.




Generated Images to Inspire Collection:









Afro Futurism Collection


Produced By: Omolara Aneke  

References  

AIArtists (no date) Scott Eaton – Artist Profile (Photos, Videos, Exhibitions), AIArtists.org. Available at: https://aiartists.org/scott-eaton (Accessed: 3 May 2020).
Bergmann, U. and Jetchev, N. (2017) A State-of-the-Art Method for Generating Photo-Realistic Textures in Real TimeZalando Jobs. Available at: https://jobs.zalando.com/en/tech/blog/a-state-of-the-art-method-for-generating-photo-realistic-textures-in-real-time/ (Accessed: 11 April 2020). 
Boddington, R. (2020) “These are important visual moments”: artist Robbie Barrat pushes, tests and breaks AI in his works. Available at: https://www.itsnicethat.com/features/ones-to-watch-2020-robbie-barrat-digital-240220 (Accessed: 11 April 2020). 
bustBright (2020) Training a StyleGAN2 model on Colab - YouTube. Available at: https://www.youtube.com/watch?v=hv3A62Ojqdg&t=1184s (Accessed: 3 May 2020).
Dennis, C. A. (no date) ‘AI-Generated Fashion Designs: Who or What Owns the Goods?’, p. 54. 
Diderich, J. and Diderich, J. (2020) ‘Acne Studios Men’s Fall 2020’, WWD, 20 January. Available at: https://wwd.com/runway/mens-fall-collections-2020/paris/acne/review/ (Accessed: 11 April 2020). 
Jetchev, N., Bergmann, U. and Seward, C. (2017) ‘GANosaic: Mosaic Creation with Generative Texture Manifolds’, p. 10. 
Liu, L. et al. (2019) ‘Toward AI fashion design: An Attribute-GAN model for clothing match’, Neurocomputing, 341, pp. 156–167. doi10.1016/j.neucom.2019.03.011. 
Luce, L. (2018 a) Data Mining and Trend Forecasting | SpringerLink. Available at: https://link.springer.com/chapter/10.1007%2F978-1-4842-3931-5_9 (Accessed: 10 April 2020). 
Luce, L. (2018 b) This startup is selling ‘little black dresses’ designed by AIFuturism. Available at: https://futurism.com/the-byte/startup-bizarre-dresses-designed-ai (Accessed: 3 May 2020). 
Luce, L. (2018 c) 8. Generative Models as Fashion Designers - Artificial Intelligence for Fashion: How AI is Revolutionizing the Fashion Industry. Available at: https://learning.oreilly.com/library/view/artificial-intelligence-for/9781484239315/html/462363_1_En_8_Chapter.xhtml (Accessed: 10 April 2020). 
Luce, L. (2018 d) 9. Data Mining and Trend Forecasting - Artificial Intelligence for Fashion: How AI is Revolutionizing the Fashion Industry. Available at: https://learning.oreilly.com/library/view/artificial-intelligence-for/9781484239315/html/462363_1_En_8_Chapter.xhtml (Accessed: 10 April 2020). 
Luo, Y. and Siau, K. (2019) ‘AI-Fashion: Collaborative AI in the Fashion Industry’, p. 1. 
Onuoha, M. (2020) MimiOnuoha/missing-datasets. Available at: https://github.com/MimiOnuoha/missing-datasets (Accessed: 3 May 2020). 
Palacio, A. S. (2019) Designing Fashion Items using a Generative Adversarial NetworkMedium. Available at: https://medium.com/serendeepia/designing-fashion-items-using-a-generative-adversarial-network-577880f3df2d (Accessed: 10 April 2020). 
Papagiannis, H. (2020) Acne Studios x Robbie BarratXR Goes Pop. Available at: https://xrgoespop.com/home/acne-studios-x-robbie-barrat (Accessed: 11 April 2020). 
Schultz, D. (2020) dvschultz/ai, GitHub. Available at: https://github.com/dvschultz/ai (Accessed: 3 May 2020).
Synced (2019) AI Creates Fashion Models With Custom Outfits and PosesSynced. Available at: https://syncedreview.com/2019/08/29/ai-creates-fashion-models-with-custom-outfits-and-poses/ (Accessed: 10 April 2020). 
Wickramarathne, P. et al. (2019) ‘TrendiTex: An Intelligent Fashion Designer’, in 2019 International Seminar on Research of Information Technology and Intelligent Systems (ISRITI). 2019 International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), pp. 505–510. doi10.1109/ISRITI48646.2019.9034631. 
Wikipedia (2019) ‘African wax prints’, Wikipedia. Available at: https://en.wikipedia.org/w/index.php?title=African_wax_prints&oldid=923948564 (Accessed: 3 May 2020). 



 o Instructions for compiling and running your project.