# Tensor	 the bounding boxes of the objects in the image, in the format of (x1, y1, x2, y2) convert translation to image coordinates

**URL:** <https://discuss.roboflow.com/t/tensor-the-bounding-boxes-of-the-objects-in-the-image-in-the-format-of-x1-y1-x2-y2-convert-translation-to-image-coordinates/1872>\
**Category:** 🤝  Community Help\
**Tags:** convert\
**Created:** [April 6, 2023, 7:21pm UTC](https://discuss.roboflow.com/t/tensor-the-bounding-boxes-of-the-objects-in-the-image-in-the-format-of-x1-y1-x2-y2-convert-translation-to-image-coordinates/1872 "2023-04-06T19:21:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Влад\_Тихонравов](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/%D0%B2%D0%BB%D0%B0%D0%B4_%D1%82%D0%B8%D1%85%D0%BE%D0%BD%D1%80%D0%B0%D0%B2%D0%BE%D0%B2/32/1634_2.png) [@Влад\_Тихонравов](https://discuss.roboflow.com/u/%D0%92%D0%BB%D0%B0%D0%B4_%D0%A2%D0%B8%D1%85%D0%BE%D0%BD%D1%80%D0%B0%D0%B2%D0%BE%D0%B2)\
**Post date:** [April 6, 2023, 7:21pm UTC](https://discuss.roboflow.com/t/tensor-the-bounding-boxes-of-the-objects-in-the-image-in-the-format-of-x1-y1-x2-y2-convert-translation-to-image-coordinates/1872/1 "2023-04-06T19:21:25Z")

</div>

0 0.09453125 0.90234375 0.1890625 0.1953125  
I have a tensor and I have problems translating to the coordinates in the picture (640,640) I translated on this site for datasets and translated for the yolov8 model  
On this site, I translated the boxes into a tensor for yolov8  
and I have my own output tensors and they need to be translated the other way around, that is, into coordinates

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [April 13, 2023, 12:20am UTC](https://discuss.roboflow.com/t/tensor-the-bounding-boxes-of-the-objects-in-the-image-in-the-format-of-x1-y1-x2-y2-convert-translation-to-image-coordinates/1872/2 "2023-04-13T00:20:53Z")

</div>

Hi @Влад_Тихонравов - if I understand correctly, you’re aiming to convert the detections from the normalized values of 0-1, to the pixel coordinates?

For YOLOv8 inference, you can receive predictions as boxes, for example, with object detection. We have an example for it in the training notebook: [GitHub - roboflow/notebooks: Set of Jupyter Notebooks linked to Roboflow blog posts and used in our YouTube videos.](https://github.com/roboflow/notebooks)

- [Train YOLOv8 on a Custom&nbsp;Dataset](https://blog.roboflow.com/how-to-train-yolov8-on-a-custom-dataset) - written tutorial
- [YOLOv8: How to Train for Object Detection on a Custom Dataset - YouTube](https://youtu.be/wuZtUMEiKWY) - video tutorial for training (also linked in the blog post), which includes a walkthrough of using `results`

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/7/7ade18f8b7f60d0505a25af751a1c0b6b7b54c1a.png)

- result.py API reference: [Results - YOLOv8 Docs](https://docs.ultralytics.com/reference/results/)
- result.py source code: [ultralytics/results.py at main · ultralytics/ultralytics · GitHub](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/yolo/engine/results.py)

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/f/f5ecc54538b73e527cd449dab3bab976610ba84c.png)
