CVHub520 / X-AnyLabeling

Effortless data labeling with AI support from Segment Anything and other awesome models.
GNU General Public License v3.0
4.27k stars 484 forks source link

在标签json文件中的direction这个值是怎么计算得到? #626

Closed DWendou closed 2 months ago

DWendou commented 2 months ago

Search before asking

Question

{ "version": "2.3.6", "flags": {}, "shapes": [ { "label": "car", "score": null, "points": [ [ 46.07167569024162, 168.296862231516 ], [ 371.12562807553604, 283.2804325425675 ], [ 274.5533243097584, 556.286471101817 ], [ -50.50062807553576, 441.3029007907661 ] ], "group_id": null, "description": "", "difficult": false, "shape_type": "rotation", "flags": {}, "attributes": {}, "kie_linking": [], "direction": 0.33999999999999464 } ], "imagePath": "img_0424_2328.jpg", "imageData": null, "imageHeight": 960, "imageWidth": 1280 }

Additional

No response

CVHub520 commented 2 months ago

Hey there! @DWendou

Thank you for your question about the direction value in the JSON file. 😊

The direction value is calculated based on the coordinates of the bounding box. You can refer to the code in the yolov5_obb.py file for more details. Here is the link to the relevant section of the code:

https://github.com/CVHub520/X-AnyLabeling/blob/4cea9aece63a3138a82e2330247e43312a6cbadd/anylabeling/services/auto_labeling/yolov5_obb.py#L183

This should help you understand how the direction value is computed. If you have any further questions, feel free to ask! 🚀

DWendou commented 2 months ago

Hey there! @DWendou

Thank you for your question about the direction value in the JSON file. 😊

The direction value is calculated based on the coordinates of the bounding box. You can refer to the code in the yolov5_obb.py file for more details. Here is the link to the relevant section of the code:

https://github.com/CVHub520/X-AnyLabeling/blob/4cea9aece63a3138a82e2330247e43312a6cbadd/anylabeling/services/auto_labeling/yolov5_obb.py#L183

This should help you understand how the direction value is computed. If you have any further questions, feel free to ask! 🚀

great!!!Successfully solved my problem, thank you very much