Batch Automation:

Helping AI Kill Retouching

Portraits take a long time to edit — since I was often paid per image, anything that slowed me down was costing me money.

The typical workflow involved two main phases: Treatment, where broad, global adjustments to the color and contrast of the image are made, and Clean-up, the meticulous removal of imperfections. Both phases were essential, yet painstakingly slow, with Treatment offering a canvas for artistic expression.

Everything changed with the advent of AI. While these tools adeptly handled Clean-up, they lacked the capability for batch processing, a feature that promised to revolutionize my workflow. What if I could drop the photos into a folder, leave to work on another project, and come back to a folder of edited images?

Up until this point, the only Photoshop automations I had made were using Photoshop Actions, but Actions lacked the functionality for this particular task.

Actions weren't all bad though! I was able to create an Action which automatically edited the subject's skin, and provided a way to modify adjustments after processing using Photoshops built-in functionality — by using familiar native tools, this new workflow would be easier to adopt.

I chose C# for this project because when I was doing my initial research, I found that it natively supported basic interactions with Photoshop which would allow
1. Watched Folders
2. Opening Files with Photoshop
3. Running a Photoshop Action

This was everything I needed to get started.

Each step of the way began by gathering and reverse engineering snippets of C# boilerplate which I could learn from.

This journey was fraught with small challenges, from understanding `FileSystemWatcher` to navigate the intricacies of C# and the Photoshop Type Library. Each hurdle was a learning moment, allowing me to document solutions for future projects.

The breakthrough came with the successful automation of batch processing, a feat that allowed me to drop photos into a folder and return to a collection of edited images, ready for delivery.

Technically, this could have been solved by using photoshops built-in batch processing tool on a remote PC, but this is creates the opportunity for clients to upload images directly for processing, eliminating the need for direct artist-client interaction. I recognize that this can introduce errors, however, depending on our use-case, we can potentially ignore this if the clients aren't needing incredibly detailed work. In a fast-moving world of social media images, this opens up new revenue opportunities.

After using the tool for a week, I've been able to turn days of work in hours, and in some cases outright eliminate the work altogether. It cut my time down by at least 50% for my regular portrait editing and allowed me to spend more time working in the Treatment phase which has improved the way my images look.

This was my first experience creating a Photoshop tool, and my first time coding in C#.

It was a balancing act between learning and doing. I opted for top down learning because it allowed me to hone in on specific knowledge gaps, instead of bottom up learning; this saved development time by bypassing research on Photoshop Scripting fundamentals.

I prefer a more hands on approach to learning because it allows me to fill knowledge gaps naturally in a way that scales with the tools and techniques I'm actively using the most — efficiency first.

Moving forward, I would like to build out some foundational knowledge before diving in because it would make it easier to understand the solutions available to me. I think that comes with experience; as I come across new problems, I can review my notes on challenges that I faced in the past and how I've solved them. And having documented the solutions I made, I feel more confident in my ability to quickly problem solve next time.

View on GitHub




Using Format