Engineering note / Rust segmentation / Part 2

From 502 synthetic rust samples to 400 training candidates

By Updated October 21, 2026Data generation, review and cleaning

The first note compared GPT Image 2.5 Sunburst and Nano Banana 2.1 on eight prompts. The next step was to generate a larger pool of synthetic RGB images and rust masks, inspect the results, and decide what to keep for a future RF-DETR segmentation model.

The review completed on 16 October 2026 covered 502 image–mask pairs. I retained 400 and set aside 102. This note covers that preparation stage. RF-DETR training has not happened yet.

What was the result?

79.7% of the reviewed samples were retained as training candidates. That is an encouraging practical yield for this experiment: roughly four usable candidates for every five inspected. It measures the outcome of a visual screening process, not mask accuracy or a trained detector’s performance. Small contour errors may remain in the retained labels.

Two retained synthetic painted-post samples with generated rust masks: 502 reviewed and 400 retained
Two retained examples, with their own generated masks at 50% opacity. The photographs are different generated scenes, not pixel-matched views.

486 new samples, plus the 16-sample pilot

The new batch contained 486 generated image–mask pairs: 243 from each model. Adding the eight earlier GPT samples and eight Nano Banana samples brought the reviewed pool to 502, evenly divided between the two generators. Each sample consists of one RGB image and its associated binary rust label; it counts once, not twice.

The generation records name the models GPT Image 2.5 Sunburst and Nano Banana 2.1, with the bulk images generated through Picsart. I use those recorded names here. As explained in the pilot, a saved product or export label is not the same as an independently verified backend version.

Generation and retention, including the pilot
GeneratorNew batchPilotReviewedRetainedExcludedRetained share
Nano Banana 2.124382512163586.1%
GPT Image 2.5 Sunburst24382511846773.3%
Total4861650240010279.7%

Of the retained examples, 392 came from the new batch—211 Nano Banana and 181 GPT—and eight from the pilot: five Nano Banana and three GPT. The new-batch retention rate alone was 80.7%.

The two generation mixes were different

The equal model totals do not make this a controlled head-to-head benchmark. The Nano Banana batch contained more posts and access caps; the GPT batch included more hull and distant-railing scenes. For example, the new batch had 48 GPT hull samples versus eight Nano Banana hull samples, and 28 versus eight distant-railing samples. Scene difficulty and prompt allocation affect the aggregate result. The higher Nano Banana retention here is useful workflow evidence, not proof of a generally more accurate model.

Scene-family distribution across both generators
Scene familyReviewedRetainedExcluded
Painted posts725814
Access caps60537
Close guardrails70628
Structural beams704723
Mooring bollards66615
Steel plates56488
Boat hulls563917
Distant railings362412
Earlier pilot · mixed scenes1688
Total502400102

What “retained” means in this review

The workflow paired each RGB image with a coloured mask overlay in numbered contact sheets. All 502 pairs were screened; ambiguous examples were examined in larger views. The screening target was large, visible geometry or semantic errors. This was not an independent, pixel-by-pixel reannotation of every image.

The label rule remained the same as in the pilot: exposed, visibly corroded iron or steel is positive. Intact paint, clean metal, shadows, dirt, vegetation, reflections and runoff staining on intact coating are negative. An image could be convincing as a photograph and still fail as a labelled training sample.

The exclusion notes repeatedly identified displaced masks, substantial unlabelled rust, intact coating marked positive, ambiguous staining and false-positive image borders. 98 excluded samples came from positive-scene prompts and four from negative-scene prompts. These are prompt types, not a measurement of prediction errors; I have not assigned mutually exclusive counts to the overlapping failure reasons.

Retained samples passed this screening threshold. They are candidates I can use for the next training experiment, with residual small contour errors still possible. The 102 excluded samples were kept separately for traceability rather than silently mixed back into the training pool.

Mask cleaning and its tradeoffs

The preparation split the generated RGB/mask panels at the midpoint, applied a 128 threshold and used 8-connected positive regions. There was no geometric realignment, contour smoothing or automatic hole filling. Gross spatial or semantic errors were grounds for exclusion, not something the file-format conversion could repair.

Four visually checked rust-free scenes had sparse positive noise explicitly cleared: 342, two, three and 232 pixels, respectively. These were logged, sample-specific corrections. A “negative” prompt alone was not used as justification to erase a mask.

A separate training-oriented version removed connected positive islands with an area below 32 source pixels. It affected 197 of the 400 retained images, removed 26,915 positive pixels, and reduced the total number of regions from 5,323 to 2,406. The largest final per-image region count was 64.

That is a deliberate tradeoff. Removing tiny islands can suppress noise and fragmentation, but it can also remove genuine small corrosion. The threshold is an area at source resolution, not a 32-pixel width or a universal definition of irrelevant rust. The unfiltered masks remain available privately for later experiments. The filter adds no positive pixels and leaves the boundaries and holes of the surviving regions unchanged.

What is ready for the next experiment?

The retained pool contains 256 positive images and 144 negative images. Rust-free examples make up 36% of the set, providing scenes where the intended output is an empty mask. The prepared export contains 400 RGB images, their semantic masks, and 2,406 connected-region annotations under one rust category.

Current prepared split after review and mask filtering
SplitPositiveNegativeTotal
Train210115325
Validation231538
Test231437
Total256144400

The split groups related samples by their recorded prompt hash across generators; corresponding pilot scene variants also stay together. This avoids placing the same recorded prompt group into multiple splits. Exact RGB duplication and group overlap were checked in the preparation workflow. It does not rule out visually similar scenes generated from different prompts, and a full perceptual near-duplicate audit has not been performed.

The export checks cover geometry and encoding, including mask reconstruction, region areas and boxes. Passing those checks means the files are technically consistent; it does not establish semantic label correctness. The processing environment had not run an RF-DETR data-loader or training-batch test at this stage.

Questions answered

How many synthetic rust samples were generated and kept?

The new batch contained 486 pairs, 243 per generator. With the 16-sample pilot, 502 pairs were reviewed. The review retained 400 and excluded 102: a 79.7% retention rate.

Does 79.7% retention mean 79.7% segmentation accuracy?

No. It is the share retained after screening for large visible errors. No independent pixel-level reference or trained-model accuracy was measured.

Which model contributed more retained samples?

Nano Banana 2.1 contributed 216, including five pilot samples. GPT Image 2.5 Sunburst contributed 184, including three pilot samples. The scene mixes differ, so these totals are not a controlled comparison of general model quality.

Have these data been used to train RF-DETR?

Not yet. This note documents data generation, visual screening, mask cleaning and dataset preparation. Training and real-image evaluation remain separate future work.

Can I download the complete dataset from this article?

No. This article shares selected reduced previews to explain the workflow. The full generation archive, private review gallery and prepared training set are not published here.

Continue the project

This note reports the 16 October 2026 review snapshot. The counts come from the saved generation manifest, visual decisions and final preparation summary. The examples preserve the reviewed mask geometry apart from the explicitly labelled component-filter comparison.

Notes from the workbench

Keep an eye on what’s next.

New engines, live demos, and practical engineering notes from me, Antal. Occasional emails when there’s something worth sharing.