Skip to content

Commit 1af9105

Browse files
himalayanZephyrnmanovic
authored andcommitted
Yolov3 interpretration script fix for 'Annotation failed' and changes to mapping.json (#896) (#912)
1 parent 32027ce commit 1af9105

File tree

3 files changed

+87
-80
lines changed

3 files changed

+87
-80
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ https://github.com/opencv/cvat/issues/750).
2222
### Changed
2323
- page_size parameter for all REST API methods
2424
- React & Redux & Antd based dashboard
25+
- Yolov3 interpretation script fix and changes to mapping.json
2526

2627
### Deprecated
2728
-

utils/open_model_zoo/yolov3/interp.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,10 @@ def parse_yolo_region(self, blob: 'np.ndarray', original_shape: list, params: di
151151
ymin = obj['ymin']
152152
ymax = obj['ymax']
153153

154+
# Enforcing extra checks for bounding box coordinates
155+
xmin = max(0,xmin)
156+
ymin = max(0,ymin)
157+
xmax = min(xmax,width)
158+
ymax = min(ymax,height)
159+
154160
results.add_box(xmin, ymin, xmax, ymax, label, frame_number)
Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
11
{
22
"label_map": {
3-
"1": "person",
4-
"2": "bicycle",
5-
"3": "car",
6-
"4": "motorbike",
7-
"5": "aeroplane",
8-
"6": "bus",
9-
"7": "train",
10-
"8": "truck",
11-
"9": "boat",
12-
"10": "traffic light",
13-
"11": "fire hydrant",
14-
"12": "stop sign",
15-
"13": "parking meter",
16-
"14": "bench",
17-
"15": "bird",
18-
"16": "cat",
19-
"17": "dog",
20-
"18": "horse",
21-
"19": "sheep",
22-
"20": "cow",
23-
"21": "elephant",
24-
"22": "bear",
25-
"23": "zebra",
26-
"24": "giraffe",
27-
"25": "backpack",
28-
"26": "umbrella",
29-
"27": "handbag",
30-
"28": "tie",
31-
"29": "suitcase",
32-
"30": "frisbee",
33-
"31": "skis",
34-
"32": "snowboard",
35-
"33": "sports ball",
36-
"34": "kite",
37-
"35": "baseball bat",
38-
"36": "baseball glove",
39-
"37": "skateboard",
40-
"38": "surfboard",
41-
"39": "tennis racket",
42-
"40": "bottle",
43-
"41": "wine glass",
44-
"42": "cup",
45-
"43": "fork",
46-
"44": "knife",
47-
"45": "spoon",
48-
"46": "bowl",
49-
"47": "banana",
50-
"48": "apple",
51-
"49": "sandwich",
52-
"50": "orange",
53-
"51": "broccoli",
54-
"52": "carrot",
55-
"53": "hot dog",
56-
"54": "pizza",
57-
"55": "donut",
58-
"56": "cake",
59-
"57": "chair",
60-
"58": "sofa",
61-
"59": "pottedplant",
62-
"60": "bed",
63-
"61": "diningtable",
64-
"62": "toilet",
65-
"63": "tvmonitor",
66-
"64": "laptop",
67-
"65": "mouse",
68-
"66": "remote",
69-
"67": "keyboard",
70-
"68": "cell phone",
71-
"69": "microwave",
72-
"70": "oven",
73-
"71": "toaster",
74-
"72": "sink",
75-
"73": "refrigerator",
76-
"74": "book",
77-
"75": "clock",
78-
"76": "vase",
79-
"77": "scissors",
80-
"78": "teddy bear",
81-
"79": "hair drier",
82-
"80": "toothbrush"
3+
"0": "person",
4+
"1": "bicycle",
5+
"2": "car",
6+
"3": "motorbike",
7+
"4": "aeroplane",
8+
"5": "bus",
9+
"6": "train",
10+
"7": "truck",
11+
"8": "boat",
12+
"9": "traffic light",
13+
"10": "fire hydrant",
14+
"11": "stop sign",
15+
"12": "parking meter",
16+
"13": "bench",
17+
"14": "bird",
18+
"15": "cat",
19+
"16": "dog",
20+
"17": "horse",
21+
"18": "sheep",
22+
"19": "cow",
23+
"20": "elephant",
24+
"21": "bear",
25+
"22": "zebra",
26+
"23": "giraffe",
27+
"24": "backpack",
28+
"25": "umbrella",
29+
"26": "handbag",
30+
"27": "tie",
31+
"28": "suitcase",
32+
"29": "frisbee",
33+
"30": "skis",
34+
"31": "snowboard",
35+
"32": "sports ball",
36+
"33": "kite",
37+
"34": "baseball bat",
38+
"35": "baseball glove",
39+
"36": "skateboard",
40+
"37": "surfboard",
41+
"38": "tennis racket",
42+
"39": "bottle",
43+
"40": "wine glass",
44+
"41": "cup",
45+
"42": "fork",
46+
"43": "knife",
47+
"44": "spoon",
48+
"45": "bowl",
49+
"46": "banana",
50+
"47": "apple",
51+
"48": "sandwich",
52+
"49": "orange",
53+
"50": "broccoli",
54+
"51": "carrot",
55+
"52": "hot dog",
56+
"53": "pizza",
57+
"54": "donut",
58+
"55": "cake",
59+
"56": "chair",
60+
"57": "sofa",
61+
"58": "pottedplant",
62+
"59": "bed",
63+
"60": "diningtable",
64+
"61": "toilet",
65+
"62": "tvmonitor",
66+
"63": "laptop",
67+
"64": "mouse",
68+
"65": "remote",
69+
"66": "keyboard",
70+
"67": "cell phone",
71+
"68": "microwave",
72+
"69": "oven",
73+
"70": "toaster",
74+
"71": "sink",
75+
"72": "refrigerator",
76+
"73": "book",
77+
"74": "clock",
78+
"75": "vase",
79+
"76": "scissors",
80+
"77": "teddy bear",
81+
"78": "hair drier",
82+
"79": "toothbrush"
8383
}
8484
}

0 commit comments

Comments
 (0)