How to Improve Small Object Detection in Indoor Warehouse Drone Images Using PyTorch?

Hello everybody,

My work involves investigating the possibility of using PyTorch computer vision models to help in inventory recognition using

AI-based indoor drones in industrial warehouses.

The problem with taking pictures inside a warehouse with the use of drones is that it becomes hard to detect small items and other identifiers when the picture taken has repeating shelves and varied lighting conditions.

For this specific case, I would like to compare object detection models that are based on CNNs and ViT (Vision Transformer).

I’m interested in three technical aspects:

  1. Small object detection: What PyTorch-compatible model architecture or feature pyramid method should be considered in situations where the inventory label occupies only a small part of the image?

  2. Model optimization: What methods may be used to decrease latency and reduce memory consumption without compromising the model’s performance?

  3. Evaluation: What metrics should be used for evaluating false detections and missing inventory labels?

I am especially interested in the implementation of PyTorch, torchvision optimizations, and evaluation of computer vision on the edge.

For background on the industrial application, ZenaDrone’s indoor drone technology guide describes indoor drone use cases.

Declaration of Interest: I am employed by ZenaDrone.

Could you share any suggestions on how one can evaluate the detection of small objects in indoor scenes using PyTorch?

model validation. i.e. argmin(detection probability), with a held out sample, and then see how this model performs on the held out sample. I haven’t done too much with CNN’s for CV but I’ve built statistical models that work in practice. Probably tuning hyper-parameters or additional, not general, specific training data might apply. In statistics, we call this a controlled experiment. Experimental design.

Thanks for the thoughtful response. I agree that validating the model on a held-out sample is important, especially for checking whether improvements in small-object detection actually generalize beyond the training data.

The point about treating hyperparameter tuning and additional, task-specific training data as a controlled experiment is also very useful. For indoor warehouse drone imagery, I think carefully designed validation splits could help distinguish whether the model is improving because of better tuning or because it is simply becoming more familiar with specific image conditions.

I appreciate the statistical perspective on experimental design. It gives me another useful way to think about evaluating the detection results.

You’re welcomed. I have a few computer vision and LLM engineers, and GPU developers on-deck if you’re interested in a contract. I have a website, link available through my linkedin, and my personal email is my first and last name at gmail. We can complete this contrac for you.

For labels that take up a tiny part of the frame, I’d try tiled inference before switching architectures: cut each image into overlapping tiles (SAHI-style), run the detector per tile and merge with NMS. If you train your own model, an extra high-res FPN level (P2) with anchors sized to your labels usually matters more than CNN vs ViT, and fp16 plus torch.compile or a TensorRT export is where I’d look first for latency. For evaluation I’d report recall and AP split by object size (COCO’s AP_small) and count missed labels per shelf, since a missed item costs more than a duplicate box here. (I’m with aicost.tools, just sharing what I’d try.)

Thanks for sharing these detailed suggestions. The idea of using SAHI-style tiled inference before changing the model architecture is particularly interesting. I also appreciate your recommendations on FPN P2, anchor optimization, and evaluating performance through AP_small and missed detections per shelf.

These are useful insights for improving small-object detection in indoor warehouse drone imagery. I’ll certainly consider these approaches in further research and experimentation.

Thanks again for sharing your technical perspective!

Repeating shelves are a different failure from small boxes: the same texture shows up many times, so a detector that only looks at a tiny crop will fire duplicates. A practical split is to find the shelf or bay first, then run the small-label detector only inside that region, and to keep train and validation aisles disjoint so lighting changes are not memorized. For misses versus false alarms, pick the score threshold at a fixed high recall and report precision there, plus how often two boxes land on one label. On device, shrink the tile rather than the whole frame, and only quantize after that tile size is frozen, because quantization error shows up first on the smallest boxes.