transform: async()

in packages/core/src/dataset-pool/pipeline-type/object-detection.ts [20:31]


    transform: async (sample: Sample<Coco.Image, Coco.Label>): Promise<ObjectDetection.Sample> => {
      const newLabels = sample.label.map((lable) => {
        return {
          name: categoryFiner[lable.category_id].name,
          bbox: lable.bbox
        };
      });
      return {
        data: { uri: sample.data.url || sample.data.coco_url || sample.data.flickr_url },
        label: newLabels
      };
    },