# Debugging in Object Detection in Detectron2

**URL:** <https://discuss.pytorch.org/t/debugging-in-object-detection-in-detectron2/107595>\
**Category:** vision\
**Created:** [December 31, 2020, 11:53am UTC](https://discuss.pytorch.org/t/debugging-in-object-detection-in-detectron2/107595 "2020-12-31T11:53:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![draaken0](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@draaken0](https://discuss.pytorch.org/u/draaken0)\
**Post date:** [December 31, 2020, 11:53am UTC](https://discuss.pytorch.org/t/debugging-in-object-detection-in-detectron2/107595/1 "2020-12-31T11:53:51Z")

</div>

I have trained a model in detectron2. But, it does lot of false prediction if i use it on supermarket as the model was trained on the images taken inside home and arranging products. So, is there any way where i can visualize output of layers of the model, i mean the anchor boxes being generated by the model? Also model predicts properly when i test it on products which are placed on the selves inside my home (similar images) but predict poorly when i take it to any super market. So, is there any proper way to reduce the false predictions.

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [January 12, 2021, 8:37am UTC](https://discuss.pytorch.org/t/debugging-in-object-detection-in-detectron2/107595/2 "2021-01-12T08:37:38Z")

</div>

You could capture more training data from the “supermarket” setup and finetune the model on this data domain, which would most likely reduce the prediction error.

---

<div class="post-metadata">

**Author:** ![draaken0](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@draaken0](https://discuss.pytorch.org/u/draaken0)\
**Post date:** [January 13, 2021, 10:51am UTC](https://discuss.pytorch.org/t/debugging-in-object-detection-in-detectron2/107595/3 "2021-01-13T10:51:24Z")

</div>

Ok, but is there any way to reduce false prediction on **Similar** objects, i mean like Pepsi diet can and Coke diet can, they both are in silver colour. We cannot label everything so is there anyway se can do this ? I am reading lot of articles but couldn’t find much of it.
