Sign up and get 15% off the four courses and Lifetime.

AI and brand consistency

Lesson

Training a model on your own product

Lesson 3 of 10 in AI and brand consistency.

Lesson

Training a model on your own product means teaching an image model exactly what your product looks like, using your own photographs. The result is a trained adapter, a small add-on to the model that lets it put your actual product into scenes you never shot. Without one you can ask for a bottle like yours. With one you can ask for yours.

The training run itself is short. You upload twenty to fifty photographs to a hosted trainer, such as Replicate's, and wait. How the training works is covered in the lessons on training, fine-tuning and adapters. The photographs you train on, called the dataset, decide nearly all of the quality, so they are the subject here.

We will follow a hair oil brand from Kochi that sells in a ribbed glass bottle with a wooden cap.

Change everything except the product

A model learns whatever repeats across the set. If half your photos sit on the same grey paper background, the model decides the grey paper is part of the bottle and brings it into every scene. So the bottle should be the only thing that stays the same.

Shoot on at least three different backgrounds, and keep any one of them to no more than a third of the set. Light the bottle evenly and plainly, in at least two different set-ups. Dramatic light gets learnt too, and then it turns up in every picture you make.

Cover every side and every distance

Coverage means photographing the product from every angle, at more than one distance and in more than one light. It is what stops a model learning a single photograph.

For the hair oil, every face of the bottle should appear in at least three frames, including the top of the cap and the base. Shoot at three distances: the whole bottle, a mid shot, and close details of the label, the cap and the ribbed glass. Use the current packaging only. If the label changed last year, leave the old photos out, and keep the set in a folder with the date in its name.

Get permission and choose a trigger word

Train only on photographs you own or have licensed for this use. Older photography contracts rarely mention training, and a contract that says nothing is not permission. Ask the photographer to confirm in writing that the shoot may be used to train an image model, and keep that reply with the dataset.

The trigger is the word you put in a prompt to call up your trained product. Make it a word the model does not already know, such as a made-up string of letters, so your bottle does not get mixed up with something the model has already learnt.

Test it on scenes you chose in advance

Before you train, write down five test scenes, each far from anything in the photographs. For the hair oil, that could be the bottle on a bathroom shelf at night, on wet sand, held in a hand, on a market stall and beside a brass basin. If you choose the tests afterwards, you will choose the ones it passes.

Generate each scene and look at the results at full size. Look for the cap that changed shape, the label that moved and the ribs that softened. A model that gets the bottle right eighty per cent of the time still needs a person checking every image.

Keep the photographs safe after training. Models change and adapters usually need retraining, but a good set of photographs can be trained onto whatever comes next in an afternoon.

The next lesson explains why colour is the first thing to break, and how to keep it right.