Skip to content

Commit 44e3ae1

Browse files
Add BBox ID To jsonl (#518)
1 parent 52ad991 commit 44e3ae1

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.artifact/tree.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
"test_fake_bucket": {
33
"custom": {
44
"fakedata_custom_training.jsonl": {
5-
"hash": "7e788942eb878d633d3f5155102e2666",
6-
"size": 933
5+
"hash": "c717c47258c132598b53e9ddaa882719",
6+
"size": 966
77
},
88
"fakedata_empty_bucket.jsonl": {
9-
"hash": "6d7c59b1166cb1b0d360baab7d7bd27f",
10-
"size": 366
9+
"hash": "df141cca5941b6724a0e30ed5fce027c",
10+
"size": 377
1111
}
1212
},
1313
"detection": {
1414
"fakedata_detection.jsonl": {
15-
"hash": "12129885a0720465cf97cd2e90cd7db0",
16-
"size": 948
15+
"hash": "c8199766babcdd849f8d3fc15d7b27dc",
16+
"size": 1003
1717
}
1818
},
1919
"multi": {

machinelearning/image_metadata_to_JSON.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ type CustomTrainingMetadata struct {
5353

5454
// BBoxAnnotation holds the information associated with each bounding box.
5555
type BBoxAnnotation struct {
56+
ID string `json:"id"`
5657
AnnotationLabel string `json:"annotation_label"`
5758
XMinNormalized float64 `json:"x_min_normalized"`
5859
XMaxNormalized float64 `json:"x_max_normalized"`
@@ -334,6 +335,7 @@ func getMatchingBBoxes(annotations []*datav1.BoundingBox, labels []string) []BBo
334335
match := []BBoxAnnotation{}
335336
for _, annotation := range annotations {
336337
bbox := BBoxAnnotation{
338+
ID: annotation.GetId(),
337339
AnnotationLabel: annotation.GetLabel(),
338340
XMinNormalized: annotation.GetXMinNormalized(),
339341
XMaxNormalized: annotation.GetXMaxNormalized(),

0 commit comments

Comments
 (0)