I've been trying to find a solution to this problem for a month now, but to no avail. I need to detect occupied slots in silicon wafer cassettes.

A cassette has slots from 1 to 25. This is a computer vision task, but the difficulty lies in the high density of the wafers inside the cassette, making classic BoundingBox-based detection approaches unsuitable.

A little more information: the detection frames are taken from a fixed camera, and a person positions the cassette under the camera, so there may be a slight bias. I tried the following approaches:

1. Multi-class classification based on ResNet. I labeled about 400 photos with classes from Slot_1 to Slot_25 (depending on the occupied slots in the photo). The results were good for isolated wafers, but ResNet often makes mistakes when the wafers are densely packed. Ultimately, I realized that this approach is viable, but much more data is needed. The problem is that I don't have the resources to collect that much data.

2. Keypoint detection based on YOLO Pose. I marked the data so that four points marked the corners of the cassette (two holes at the bottom and two pins at the top). I planned to subsequently correct the image perspective based on these four points and classify the presence of plates based on fixed BoundingBoxes. However, this solution also didn't work. YOLO Pose finds the BoundingBoxes well, but the points fluctuate significantly relative to the required locations.

As a result, I no longer know how to approach the problem. I don't have much experience with CV, so I'm seeking advice from more experienced people. To be more precise, I would like to know what approach should be used here, perhaps segmentation or obb.

I'm attaching photos of frames from the dataset. Photo from dataset

Photo from datasetPhoto from datasetPhoto from dataset