GUIDE · STORAGE · PICTURES
Connect your storage, train on a folder of photos, and sort new ones
This guide takes you from a bucket of photos to a model that sorts new ones: connecting the storage, training from a folder, filling new photos, and routing the results with your own workflow. It takes about 15 minutes, plus the time to read your photos.
You need:
- A workspace on Essentials or Business with the Vision add-on.
- The Owner of the workspace to connect the storage. After that, any Builder can train and fill from the folders the Owner listed.
- Photos in JPEG, PNG, WebP, GIF, BMP or TIFF, each 10 MB or less.
- Storage reachable at a public HTTPS address (port 443). Storage only your own network can reach isn't supported.
About 10 minutes to read.
Connect your storage ↓1. Decide the folders
Before connecting, choose:
- Folders AMT may read: where the training photos are, and where new photos arrive.
They can be in different buckets. For example
parts-photos/training/andparts-photos/incoming/. - Folders AMT may copy sorted photos into (optional): where sorted copies go, for example
parts-sorted/out/. It must be outside the folders AMT reads, so a later fill never reads its own copies. Leave it empty if you only want the spreadsheet of answers.
AMT keeps to these lists whatever the key or role would allow. Each folder is written as
bucket/folder/, one per line.
2. Connect the storage
Go to Settings → Storage, and under Connect pick your storage.
Amazon S3, with a role (recommended: no key)
- Choose Amazon S3, give the connection a name, and fill in the folders from step 1. Tick Add StayCharted's tags to the sorted copies if you want tags (see step 5).
- Press Make the template. AMT gives you a CloudFormation template written from your lists, with an external ID already in it.
- In the AWS console, open CloudFormation (any region) → Create stack → Upload a template file → the template. Tick the box that says the stack creates IAM resources, and create it.
- When the stack is created, copy RoleArn from its Outputs, paste it into AMT, and press Finish.
What the role can do, and nothing else:
| On | Allowed | When |
|---|---|---|
| The folders AMT reads | List, read (s3:ListBucket, s3:GetObject) |
Always |
| The folders AMT reads | Read the photo's tags (s3:GetObjectTagging) |
Only with sorted copies, so each copy keeps the original's tags |
| The copy folder | Write, and tag (s3:PutObject, s3:PutObjectTagging) |
Only with sorted copies |
| Anywhere | Delete | Never |
There's no write to a folder AMT reads, so the role itself can't change an original.
Changing the folders later: edit the connection in AMT, then in CloudFormation open the connection's stack → Update stack → replace the template with the new one AMT gives you. The role ARN stays the same.
Amazon S3 with an access key, or any S3-compatible storage
Choose your storage and enter its access key and secret. The secret is kept encrypted and is never shown again.
| Storage | What to enter |
|---|---|
| Cloudflare R2 | An R2 API token's access key, and your Cloudflare account ID |
| Backblaze B2 | An application key, and the region in your bucket's endpoint (such as us-west-004) |
| Wasabi | An access key, and the region your buckets are in |
| DigitalOcean Spaces | A Spaces access key, and the region (such as nyc3) |
| Google Cloud Storage | An HMAC key: Cloud Storage → Settings → Interoperability |
| Other S3-compatible | The endpoint (https), region and access key |
Give the key no more than it needs: read on the folders AMT reads, and write only on the copy folder if you use one. Most of these providers let you limit a key to one bucket.
3. Test
Press Test on the connection. AMT lists and reads each folder you named, and says whether the storage supports tags. If it doesn't, the tags option isn't offered: some S3-compatible storage doesn't support object tags.
4. Train from a folder
- New model → Pictures → From your storage. Choose the connection and the folder, with the folder browser, one level at a time.
- Where is each picture's category?
- The folder it's in:
training/PN-10423/IMG_4412.jpg→ PN-10423. Choose the folder level if your categories are deeper. - Its file name: choose a file-name rule or a pattern with one capture group. For
PN-10423_front.jpg→ PN-10423, use^(.+)_so the hyphen inside the part number stays in the category. - The picture's own metadata: its keywords, title or description, as your
photo library or inspection app wrote them. If a photo has several keywords, a pattern
picks the one that is the category, for example
^category:(.+)$.
- The folder it's in:
- Preview the categories. You see the categories and how many photos each has, the photos with no category (left out), and categories with too few photos.
- Read the pictures, then Check your pictures. Fix photos that look misfiled, the same photo under two categories, and near-identical copies.
- Train. The report shows how often the model is right per category, on photos it never trained on. Publish it when you're happy.
The category is only the label: the model learns from the picture itself. A new photo
named IMG_9921.jpg with no metadata is answered just the same.
More photos later: on the model page, Add new photos from this folder reads only the photos it hasn't read before. Then retrain.
5. Fill new photos
On the model, Categorize new pictures → From your storage:
- Folder of photos to fill: any folder the connection may read.
- Only photos this model hasn't answered before (on by default). A photo replaced under the same name counts as new.
- Copy each photo into a folder for its category (optional): into
<copy folder>/<category>/, and unsure answers into<copy folder>/_needs-review/. - Tag each copy with its category (optional, needs copies):
staycharted-category,staycharted-confidence,staycharted-review(yesorno) andstaycharted-model, added beside the photo's own tags. - Add the category to each copy's metadata (optional, needs copies): as a keyword, title or description, so your photo library or DAM shows it. JPEG and PNG copies get it; other formats are copied as they are, and listed.
Then start the fill. You get:
- A spreadsheet in Filled files, one row per photo, with its category and confidence.
- Unsure answers in the Review Queue, for a person to check.
- The sorted copies, if you asked for them. Each one is the original exactly (same bytes, metadata and tags) plus the additions you ticked.
The model remembers the folders, so next time it's one button on the model's Use tab: Fill new photos. Open in storage links go straight to the folders in your provider's console.
6. Route the results with your own workflow
On Amazon S3, the sorted copies can start your own process.
- In the S3 console, open the bucket with the copy folder → Properties → Amazon EventBridge → turn on Send notifications to Amazon EventBridge.
- In EventBridge → Rules → Create rule, use this event pattern to match copies that need a person:
Show JSON example
{
"source": ["aws.s3"],
"detail-type": ["Object Created"],
"detail": {
"bucket": { "name": ["parts-sorted"] },
"object": { "key": [{ "prefix": "out/_needs-review/" }] }
}
}
- Choose a target: an SNS topic to email the team, a Step Functions workflow, or a Lambda.
For one category, match its folder instead (out/PN-10423/). A Lambda that needs the
confidence can read the copy's tags with GetObjectTagging: the event itself doesn't carry
them.
On other storage, use its own notifications (Cloudflare R2 event notifications, for example), or read the folders on a schedule.
What AMT can and can't do with your storage
| AMT does | AMT never does |
|---|---|
| Lists and reads photos in the folders you listed | Writes, re-encodes, moves, tags or deletes an original |
| Copies a photo into the copy folder you listed, server-side, only if it's still the photo it answered | Writes outside the copy folder |
| Keeps its own small copy of each photo (at most 512 px), made from the pixels alone, and a thumbnail | Keeps your original |
| Records each connection, test and import in your workspace's activity | Follows redirects, or connects to private addresses |
Fixing problems
| You see | What to do |
|---|---|
| "This connection doesn't list folder" | The Owner adds the folder in Settings → Storage (and, for the S3 role, updates the stack) |
| "The storage refused to let AMT read this photo" | The key or role doesn't allow reading it: check its permissions, then Test |
| "This photo is no longer in the storage" | It was moved or deleted after the fill was set up |
| "The storage did not answer for this photo" | A temporary problem: run the fill again; only the photos not answered are read |
| A photo over 10 MB is left out | Export it smaller, or leave it out |
| No tags option | The storage doesn't support object tags (Test says so), or there's no copy folder |
| "Nothing new to fill" | Every photo in the folder has been answered: untick "Only photos this model hasn't answered before" to answer them again |
Removing a connection: Settings → Storage lists the models that use each connection, so you can see what stops working first. For Amazon S3, delete the CloudFormation stack afterwards.