Skip to content

Commit 0405cb0

Browse files
committed
Change segmentation enum values to upper case
1 parent dcc2008 commit 0405cb0

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

ios/RnExecutorch/models/image_segmentation/Constants.mm

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#import <vector>
44

55
const std::vector<std::string> deeplabv3_resnet50_labels = {
6-
"background", "aeroplane", "bicycle", "bird", "boat",
7-
"bottle", "bus", "car", "cat", "chair", "cow", "diningtable",
8-
"dog", "horse", "motorbike", "person", "pottedplant", "sheep",
9-
"sofa", "train", "tvmonitor"
6+
"BACKGROUND", "AEROPLANE", "BICYCLE", "BIRD", "BOAT",
7+
"BOTTLE", "BUS", "CAR", "CAT", "CHAIR", "COW", "DININGTABLE",
8+
"DOG", "HORSE", "MOTORBIKE", "PERSON", "POTTEDPLANT", "SHEEP",
9+
"SOFA", "TRAIN", "TVMONITOR"
1010
};

ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ - (NSDictionary *)postprocess:(NSArray *)output
126126
}
127127
}
128128

129-
result[@"argmax"] = simpleMatToNSArray<int>(argMax);
129+
result[@"ARGMAX"] = simpleMatToNSArray<int>(argMax);
130130

131131
return result;
132132
}

src/types/image_segmentation.ts

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
export enum DeeplabLabel {
2-
background,
3-
aeroplane,
4-
bicycle,
5-
bird,
6-
boat,
7-
bottle,
8-
bus,
9-
car,
10-
cat,
11-
chair,
12-
cow,
13-
diningtable,
14-
dog,
15-
horse,
16-
motorbike,
17-
person,
18-
pottedplant,
19-
sheep,
20-
sofa,
21-
train,
22-
tvmonitor,
23-
argmax, // Additional label not present in the model
2+
BACKGROUND,
3+
AEROPLANE,
4+
BICYCLE,
5+
BIRD,
6+
BOAT,
7+
BOTTLE,
8+
BUS,
9+
CAR,
10+
CAT,
11+
CHAIR,
12+
COW,
13+
DININGTABLE,
14+
DOG,
15+
HORSE,
16+
MOTORBIKE,
17+
PERSON,
18+
POTTEDPLANT,
19+
SHEEP,
20+
SOFA,
21+
TRAIN,
22+
TVMONITOR,
23+
ARGMAX, // Additional label not present in the model
2424
}

0 commit comments

Comments
 (0)