<!-- Generated by scripts/sync-agent-content.mjs. Edit the shared public sources, then regenerate. -->
# Dream2Detect

Learning package-damage assessment from synthetic images.

- Dates: 2026
- Status: Research study
- Areas: Software engineering; AI / ML
- Stack: Python · PyTorch · Computer vision
- Topics: Python; Computer Vision; PyTorch; Synthetic Data; Machine Learning; Research
- Public case study: https://mgiorgetti.com/project_details/project-dream2detect.html

## Problem

Task-specific photographs of damaged packages can be difficult to obtain and label; the study asks how far synthetic training images transfer to real photographs.

## Contribution

Designed and implemented the end-to-end pipeline for a group project: synthetic package images, human label review, model training and evaluation on real photographs.

## Technical approach and public case study

Can a model learn from generated package images and recognise damage in real photographs?

### How the experiment works

#### Generate the training images

An image generator produces packages with different damage, shapes, backgrounds, and lighting. These generated images form the task-specific training data.

Band 0–10 Least damage

Band 46–55 Middle of the scale

Band 86–100 Most damage

Three synthetic reference images from the labeling guide. The study groups damage into ten ordered bands, from least to most damaged.

#### Review what was generated

Asking for a damaged box does not guarantee the generated image shows that damage. A person reviews each image and corrects its label before it enters the training set.

First review pass · 800 generated images

Of 800 generated images reviewed, 623 kept their original label and 177 were relabeled.

**Original label kept**

623

**Label corrected**

177

The expanded pool contained 899 reviewed synthetic images. Models learned from the reviewed labels rather than assuming every prompt produced the intended damage.

#### Evaluate on real photographs

The trained models assess 385 real package photographs excluded from task-specific training. Each predicted band is compared with the photograph's human-reviewed label.

Unseen during damage training

Learned from synthetic examples

How many bands away?

Exact match means the model chose the reviewed band.

Within one band also includes either neighboring band.

The model with the highest within-one-band accuracy used a pretrained visual backbone. “Synthetic training” refers to its package-damage training, not its earlier pretraining.

### Results on 385 real photographs

The study evaluated both models on the same real photographs.

64.16%

within one damage band

ConvNeXt ensemble · EMD60 + SAM40

Within-one-band accuracy on 385 real photos: from-scratch V5-B model 39.48 percent, pretrained EMD60 plus SAM40 ensemble 64.16 percent.

**Exact-band accuracy**

21.04%

**Mean band error**

1.3351

Near misses were common. The pretrained ensemble transferred better than the custom CNN, but assigning the exact damage band remained difficult.

### What transferred

The reported within-one-band result combined two views: the full image and a crop around the package. Its training also accounted for distance between bands, so a large error cost more than a near miss.

The study shows useful transfer on this evaluation set. It does not establish reliable exact-band grading or how results would scale to a larger dataset.

## Results and limitations

The reported ensemble reached 64.16% within one severity band and 21.04% exact-band accuracy on 385 real photographs. The best result used a pretrained visual backbone; synthetic training refers to package-damage training, not earlier pretraining. The study does not establish reliable exact-band grading or larger-dataset performance.

## Public supporting links

- [Portfolio case study](https://mgiorgetti.com/project_details/project-dream2detect.html)
- [Explore the code](https://github.com/Inventure71/Dream2Detect)
- [Matteo Giorgetti profile](https://mgiorgetti.com/profile.md)
