# Issues Fine Tuning RT-DETR

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fissues-fine-tuning-rt-detr%2F135888%3E%5C
**Category:** 🤗Transformers\
**Created:** [January 15, 2025, 4:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fissues-fine-tuning-rt-detr%2F135888 "2025-01-15T16:39:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![evrcc7881](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@evrcc7881](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fevrcc7881)%5C
**Post date:** [January 15, 2025, 4:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fissues-fine-tuning-rt-detr%2F135888%2F1 "2025-01-15T16:39:31Z")

</div>

I’m trying to fine tune RT-DETR on a custom dataset using the example [notebook](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/RT-DETR), but I’m getting the following error. `'MeanAveragePrecision' object has no attribute '_iou_type'` when I scroll up in the exception chain I see this is triggered by a different exception from the following code area. ` if not _TORCHVISION_AVAILABLE: raise ModuleNotFoundError( f"Metric `{self._iou_type.upper()}` requires that `torchvision` is installed." " Please install with `pip install torchmetrics[detection]`." )`  
I have installed both torchvision and torchmetrics detecion though. This is my results from pip show

```auto
Name: pycocotools

Version: 2.0.8

Summary: Official APIs for the MS-COCO dataset

Home-page: https://github.com/ppwwyyxx/cocoapi

Author:

Author-email:

License: FreeBSD

Location:

C:\Users\-----------\anaconda3\envs\fastai\Lib\site-packages

Requires: matplotlib, numpy

Required-by:

Name: faster-coco-eval

Version: 1.6.5

Summary: Faster interpretation of the original COCOEval

Home-page: https://github.com/MiXaiLL76/faster coco eval

Author: MiXaiLL76

Author-email: mike.milos@yandex.ru

License:

Location: C:\Users\-----------\anaconda3\envs\fastai\Lib\site-packages

Requires: numpy, pandas, Pillow, plotly

Required-by:

WARNING: Package(s) not found: torchmetrics [detection]

Name: torchmetrics

Version: 1.6.1

Summary: PyTorch native Metrics

Home-page: https://github.com/Lightning-AI/torchmetrics

Author: Lightning-AI et al.

Author-email: name@pytorchlightning.ai

License: Apache-2.0

Location: C:\Users\-----------\anaconda3\envs\fastai\Lib\site-packages

Requires: lightning-utilities, numpy, packaging, torch

Required-by:

Name: torchvision

Version: 0.20.1

Summary: image and video datasets and models for torch deep learning

Home-page: https://github.com/pytorch/vision

Author: PyTorch Core Team

Author-email: soumith@pytorch.org

License: BSD

Location: C:\Users\-----------\anaconda3\envs\fastai\Lib\site-packages

Requires: numpy, pillow, torch

Required-by:

```

Does anyone have any advice on how to resolve this? I am also running python 3.12

---

<div class="post-metadata">

**Author:** ![evrcc7881](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@evrcc7881](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fevrcc7881)%5C
**Post date:** [January 15, 2025, 4:53pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fissues-fine-tuning-rt-detr%2F135888%2F2 "2025-01-15T16:53:20Z")

</div>

For anyone who finds this I couldn’t figure out the source of the environment issue. I switched to python 3.11 though and created a new environment. I tried installing everything again and then everything ran correctly.
