@@ -38,19 +38,35 @@ The snippet below shows the creation of bounding boxes of 3 different images (00
38
38
39
39
``` python
40
40
# Ground truth bounding boxes of 000001.jpg
41
- gt_boundingBox_1 = BoundingBox(imageName = ' 000001' , classId = ' dog' , x = 0.34419263456090654 , y = 0.611 , w = 0.4164305949008499 , h = 0.262 , typeCoordinates = CoordinatesType.Relative, bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (353 ,500 ))
42
- gt_boundingBox_2 = BoundingBox(imageName = ' 000001' , classId = ' person' , x = 0.509915014164306 , y = 0.51 , w = 0.9745042492917847 , h = 0.972 , typeCoordinates = CoordinatesType.Relative, bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (353 ,500 ))
41
+ gt_boundingBox_1 = BoundingBox(imageName = ' 000001' , classId = ' dog' , x = 0.34419263456090654 , y = 0.611 ,
42
+ w = 0.4164305949008499 , h = 0.262 , typeCoordinates = CoordinatesType.Relative,
43
+ bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (353 ,500 ))
44
+ gt_boundingBox_2 = BoundingBox(imageName = ' 000001' , classId = ' person' , x = 0.509915014164306 , y = 0.51 ,
45
+ w = 0.9745042492917847 , h = 0.972 , typeCoordinates = CoordinatesType.Relative,
46
+ bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (353 ,500 ))
43
47
# Ground truth bounding boxes of 000002.jpg
44
- gt_boundingBox_3 = BoundingBox(imageName = ' 000002' , classId = ' train' , x = 0.5164179104477612 , y = 0.501 , w = 0.20298507462686569 , h = 0.202 , typeCoordinates = CoordinatesType.Relative, bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (335 ,500 ))
48
+ gt_boundingBox_3 = BoundingBox(imageName = ' 000002' , classId = ' train' , x = 0.5164179104477612 , y = 0.501 ,
49
+ w = 0.20298507462686569 , h = 0.202 , typeCoordinates = CoordinatesType.Relative,
50
+ bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (335 ,500 ))
45
51
# Ground truth bounding boxes of 000003.jpg
46
- gt_boundingBox_4 = BoundingBox(imageName = ' 000003' , classId = ' bench' , x = 0.338 , y = 0.4666666666666667 , w = 0.184 , h = 0.10666666666666666 , typeCoordinates = CoordinatesType.Relative, bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (500 ,375 ))
47
- gt_boundingBox_5 = BoundingBox(imageName = ' 000003' , classId = ' bench' , x = 0.546 , y = 0.48133333333333334 , w = 0.136 , h = 0.13066666666666665 , typeCoordinates = CoordinatesType.Relative, bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (500 ,375 ))
52
+ gt_boundingBox_4 = BoundingBox(imageName = ' 000003' , classId = ' bench' , x = 0.338 , y = 0.4666666666666667 ,
53
+ w = 0.184 , h = 0.10666666666666666 , typeCoordinates = CoordinatesType.Relative,
54
+ bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (500 ,375 ))
55
+ gt_boundingBox_5 = BoundingBox(imageName = ' 000003' , classId = ' bench' , x = 0.546 , y = 0.48133333333333334 ,
56
+ w = 0.136 , h = 0.13066666666666665 , typeCoordinates = CoordinatesType.Relative,
57
+ bbType = BBType.GroundTruth, format = BBFormat.XYWH , imgSize = (500 ,375 ))
48
58
# Detected bounding boxes of 000001.jpg
49
- detected_boundingBox_1 = BoundingBox(imageName = ' 000001' , classId = ' person' , classConfidence = 0.893202 , x = 52 , y = 4 , w = 352 , h = 442 , typeCoordinates = CoordinatesType.Absolute, bbType = BBType.Detected, format = BBFormat.XYX2Y2 , imgSize = (353 ,500 ))
59
+ detected_boundingBox_1 = BoundingBox(imageName = ' 000001' , classId = ' person' , classConfidence = 0.893202 ,
60
+ x = 52 , y = 4 , w = 352 , h = 442 , typeCoordinates = CoordinatesType.Absolute,
61
+ bbType = BBType.Detected, format = BBFormat.XYX2Y2 , imgSize = (353 ,500 ))
50
62
# Detected bounding boxes of 000002.jpg
51
- detected_boundingBox_2 = BoundingBox(imageName = ' 000002' , classId = ' train' , classConfidence = 0.863700 , x = 140 , y = 195 , w = 209 , h = 293 , typeCoordinates = CoordinatesType.Absolute, bbType = BBType.Detected, format = BBFormat.XYX2Y2 , imgSize = (335 ,500 ))
63
+ detected_boundingBox_2 = BoundingBox(imageName = ' 000002' , classId = ' train' , classConfidence = 0.863700 ,
64
+ x = 140 , y = 195 , w = 209 , h = 293 , typeCoordinates = CoordinatesType.Absolute,
65
+ bbType = BBType.Detected, format = BBFormat.XYX2Y2 , imgSize = (335 ,500 ))
52
66
# Detected bounding boxes of 000003.jpg
53
- detected_boundingBox_3 = BoundingBox(imageName = ' 000003' , classId = ' bench' , classConfidence = 0.278000 , x = 388 , y = 288 , w = 493 , h = 331 , typeCoordinates = CoordinatesType.Absolute, bbType = BBType.Detected, format = BBFormat.XYX2Y2 , imgSize = (500 ,375 ))
67
+ detected_boundingBox_3 = BoundingBox(imageName = ' 000003' , classId = ' bench' , classConfidence = 0.278000 ,
68
+ x = 388 , y = 288 , w = 493 , h = 331 , typeCoordinates = CoordinatesType.Absolute,
69
+ bbType = BBType.Detected, format = BBFormat.XYX2Y2 , imgSize = (500 ,375 ))
54
70
```
55
71
56
72
The object ` BoundingBoxes ` represents a collection of the bounding boxes (ground truth and detected). Evaluation methods of the class ` Evaluator ` use the ` BoundingBoxes ` object to apply the metrics. The following code shows how to add the bounding boxes to the collection:
0 commit comments