84a8020b463b0ed23b1c96aee66701a06ad8deec,chainercv/datasets/pascal_voc/voc_detection_dataset.py,VOCDetectionDataset,get_example,#VOCDetectionDataset#Any#,67

Before Change


            // make pixel indexes 0-based
            bbox_elem = [float(b - 1) for b in bbox_elem]
            name = obj.find("name").text.lower().strip()
            bbox_elem += [self.labels.index(name)]
            bbox.append(bbox_elem)
        bbox = np.stack(bbox).astype(np.float32)

After Change


        anno = ET.parse(
            os.path.join(self.data_dir, "Annotations", id_ + ".xml"))
        bbox = []
        label = []
        for obj in anno.findall("object"):
            // when in not using difficult mode, and the object is
            // difficult, skipt it.
            if not self.use_difficult and int(obj.find("difficult").text) == 1:
                continue

            bndbox_anno = obj.find("bndbox")
            bbox_elem = [int(bndbox_anno.find("xmin").text),
                         int(bndbox_anno.find("ymin").text),
                         int(bndbox_anno.find("xmax").text),
                         int(bndbox_anno.find("ymax").text)]
            // make pixel indexes 0-based
            bbox_elem = [float(b - 1) for b in bbox_elem]
            name = obj.find("name").text.lower().strip()
            label.append(self.labels.index(name))
            bbox.append(bbox_elem)
        bbox = np.stack(bbox).astype(np.float32)
        label = np.stack(label).astype(np.int32)

        // Load a image
        img_file = os.path.join(self.data_dir, "JPEGImages", id_ + ".jpg")
        img = read_image_as_array(img_file)  // RGB
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: chainer/chainercv
Commit Name: 84a8020b463b0ed23b1c96aee66701a06ad8deec
Time: 2017-03-13
Author: yuyuniitani@gmail.com
File Name: chainercv/datasets/pascal_voc/voc_detection_dataset.py
Class Name: VOCDetectionDataset
Method Name: get_example


Project Name: dmlc/gluon-cv
Commit Name: cd7fc53a118063d64dfb1b659cfb6fe4bfe9feda
Time: 2019-08-23
Author: 33575288+douglas125@users.noreply.github.com
File Name: gluoncv/model_zoo/ssd/ssd.py
Class Name: SSD
Method Name: reset_class


Project Name: dmlc/gluon-cv
Commit Name: cd7fc53a118063d64dfb1b659cfb6fe4bfe9feda
Time: 2019-08-23
Author: 33575288+douglas125@users.noreply.github.com
File Name: gluoncv/model_zoo/yolo/yolo3.py
Class Name: YOLOV3
Method Name: reset_class