diff --git a/README.md b/README.md index 4a2294c..bc9c014 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ annotation.export_thumb_masks("xxx/masks") import wsiprocess as wp import cv2 slide = wp.slide("xxx.tiff") -annotation = wp.annotation("yyy.tiff", is_image=True) +annotation = wp.annotation("", is_image=True) target_classes = ["benign", "malignant"] annotation.add_class(target_classes) benign_mask = cv2.imread("benign_mask.png", 0) * 255 @@ -101,7 +101,7 @@ malignant_mask = cv2.imread("malignant_mask.png", 0) * 255 annotation.from_image(benign_mask, "benign") annotation.from_image(malignant_mask, "malignant") rule = wp.rule("xxx.json") -patcher = wp.patcher(slide, "classification", foreground=True) +patcher = wp.patcher(slide, "classification", annotation=annotation) patcher.get_patch_parallel(target_classes) ```