Skip to content

Commit

Permalink
Yolov3 interpretration script fix for 'Annotation failed' and changes…
Browse files Browse the repository at this point in the history
… to mapping.json (cvat-ai#896) (cvat-ai#912)
  • Loading branch information
himalayanZephyr authored and Chris Lee-Messer committed Mar 5, 2020
1 parent 2afe022 commit 67cbfb0
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 80 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ https://github.com/opencv/cvat/issues/750).
### Changed
- page_size parameter for all REST API methods
- React & Redux & Antd based dashboard
- Yolov3 interpretation script fix and changes to mapping.json

### Deprecated
-
Expand Down
6 changes: 6 additions & 0 deletions utils/open_model_zoo/yolov3/interp.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,10 @@ def parse_yolo_region(self, blob: 'np.ndarray', original_shape: list, params: di
ymin = obj['ymin']
ymax = obj['ymax']

# Enforcing extra checks for bounding box coordinates
xmin = max(0,xmin)
ymin = max(0,ymin)
xmax = min(xmax,width)
ymax = min(ymax,height)

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

0 comments on commit 67cbfb0

Please sign in to comment.