If asked who could have invented neural networks before humanity as a whole considered the potential of their existence, I would say Pavel Filonov. He was the most enigmatic figure of the Russian avant-garde and the founder of analytical art. His method lay beyond the scope of human perception. The canvases truly remind me of a compilation of neural connections, given a new synthesis of previously unseen imagery.
*The works of Pavel Nikolaevich Filonov entered the public domain in 2015.
I found it interesting to train a neural network on his works. I expected that by combining the machine’s thinking with Filonov’s, we would achieve amazing images filled with meaningfulness in its abstraction.
I have gathered all the square paintings by Pavel Filonov that I found into the archive. You can view them here.
Install necessary libraries

Initially, it was necessary to install all the required libraries. Additionally, due to a version mismatch in Perf, an update to version 17 and a complete environment restart were required.
Preparation for Study

Since the code was generated via Kaggle, I used the built-in function to create a dataset where I uploaded all the photographs. Then, I added them to the working folder cher.
Sign captions were then created for each image. I made sure they are read correctly.
Subsequently, prefixes were generated for each image using a specific function, caption_images. Thus, a prompt was created for each one.
Learning and Model Preservation
On Hugging Face, I obtained a token so that the subsequently trained model could be uploaded to the platform, and I began the training. It took about an hour.
After saving the trained model on Hugging Face, I was finally able to start generating images.
Generation
In search of a function for the trained model, I found it interesting to use it to generate a visual concept for fashion or jewelry photography centered around Russian identity for a potential brand.
Initially, I wrote a fairly brief prompt and received a rather abstract image.
Kaggle:
photo collage in FILONOV style, fashion photoshoot of a bag against the backdrop of Red Square in Moscow
That’s why I decided to write more specific prompts, and the images became much more detailed.
Kaggle:
photo collage in FILONOV style, fashion photoshoot featuring a world-famous model wearing a kokoshnik against the backdrop of the Hermitage Museum in St. Petersburg. The photo was taken for a brand presentation in a fashion magazine









