Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…_extensions into harimkan/output-align
  • Loading branch information
harimkang committed Mar 29, 2023
2 parents 4f1c5c2 + 6754fda commit 108b8c3
Show file tree
Hide file tree
Showing 160 changed files with 5,503 additions and 7,665 deletions.
18 changes: 9 additions & 9 deletions otx/algorithms/anomaly/adapters/anomalib/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ class AnomalyClassificationDataset(BaseAnomalyDataset):
Example:
>>> train_subset = {
"ann_file": "tests/assets/anomaly/classification/train.json",
"data_root": "tests/assets/anomaly/shapes",
"data_root": "tests/assets/anomaly/hazelnut",
}
>>> val_subset = {
"ann_file": "tests/assets/anomaly/classification/val.json",
"data_root": "tests/assets/anomaly/shapes"
"data_root": "tests/assets/anomaly/hazelnut"
}
>>> training_dataset = AnomalyClassificationDataset(
train_subset=train_subset, val_subset=val_subset
)
>>> test_subset = {
"ann_file": "tests/assets/anomaly/classification/test.json",
"data_root": "tests/assets/anomaly/shapes"
"data_root": "tests/assets/anomaly/hazelnut"
}
>>> testing_dataset = AnomalyClassificationDataset(test_subset=test_subset)
"""
Expand Down Expand Up @@ -169,18 +169,18 @@ class AnomalySegmentationDataset(BaseAnomalyDataset):
Example:
>>> train_subset = {
"ann_file": "tests/assets/anomaly/segmentation/train.json",
"data_root": "tests/assets/anomaly/shapes",
"data_root": "tests/assets/anomaly/hazelnut",
}
>>> val_subset = {
"ann_file": "tests/assets/anomaly/segmentation/val.json",
"data_root": "tests/assets/anomaly/shapes"
"data_root": "tests/assets/anomaly/hazelnut"
}
>>> training_dataset = AnomalySegmentationDataset(
train_subset=train_subset, val_subset=val_subset
)
>>> test_subset = {
"ann_file": "tests/assets/anomaly/segmentation/test.json",
"data_root": "tests/assets/anomaly/shapes"
"data_root": "tests/assets/anomaly/hazelnut"
}
>>> testing_dataset = AnomalySegmentationDataset(test_subset=test_subset)
Expand Down Expand Up @@ -249,18 +249,18 @@ class AnomalyDetectionDataset(BaseAnomalyDataset):
Example:
>>> train_subset = {
"ann_file": "tests/assets/anomaly/detection/train.json",
"data_root": "tests/assets/anomaly/shapes",
"data_root": "tests/assets/anomaly/hazelnut",
}
>>> val_subset = {
"ann_file": "tests/assets/anomaly/detection/val.json",
"data_root": "tests/assets/anomaly/shapes"
"data_root": "tests/assets/anomaly/hazelnut"
}
>>> training_dataset = AnomalyDetectionDataset(
train_subset=train_subset, val_subset=val_subset
)
>>> test_subset = {
"ann_file": "tests/assets/anomaly/detection/test.json",
"data_root": "tests/assets/anomaly/shapes"
"data_root": "tests/assets/anomaly/hazelnut"
}
>>> testing_dataset = AnomalyDetectionDataset(test_subset=test_subset)
Expand Down
79 changes: 32 additions & 47 deletions tests/assets/anomaly/classification/test.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,41 @@
{
"image_path": {
"1": "test/good/004.png",
"2": "test/good/005.png",
"3": "test/good/006.png",
"4": "test/good/007.png",
"5": "test/good/008.png",
"6": "test/good/009.png",
"7": "test/star/004.png",
"8": "test/star/005.png",
"9": "test/star/006.png",
"10": "test/star/007.png",
"11": "test/star/008.png",
"12": "test/star/009.png",
"13": "test/hexagon/004.png",
"14": "test/hexagon/005.png",
"15": "test/hexagon/006.png",
"16": "test/hexagon/007.png",
"17": "test/hexagon/008.png",
"18": "test/hexagon/009.png"
"0": "test/good/25.jpg",
"1": "test/good/05.jpg",
"2": "test/good/28.jpg",
"3": "test/colour/06.jpg",
"4": "test/colour/03.jpg",
"5": "test/colour/07.jpg",
"6": "test/colour/14.jpg",
"7": "test/colour/01.jpg",
"8": "test/colour/12.jpg",
"9": "test/colour/11.jpg",
"10": "test/colour/09.jpg",
"11": "test/colour/08.jpg"
},
"label": {
"0": "good",
"1": "good",
"2": "good",
"3": "good",
"4": "good",
"5": "good",
"6": "good",
"7": "star",
"8": "star",
"9": "star",
"10": "star",
"11": "star",
"12": "star",
"13": "hexagon",
"14": "hexagon",
"15": "hexagon",
"16": "hexagon",
"17": "hexagon",
"18": "hexagon"
"3": "abnormal",
"4": "abnormal",
"5": "abnormal",
"6": "abnormal",
"7": "abnormal",
"8": "abnormal",
"9": "abnormal",
"10": "abnormal",
"11": "abnormal"
},
"mask_path": {
"7": "ground_truth/star/004_mask.png",
"8": "ground_truth/star/005_mask.png",
"9": "ground_truth/star/006_mask.png",
"10": "ground_truth/star/007_mask.png",
"11": "ground_truth/star/008_mask.png",
"12": "ground_truth/star/009_mask.png",
"13": "ground_truth/hexagon/004_mask.png",
"14": "ground_truth/hexagon/005_mask.png",
"15": "ground_truth/hexagon/006_mask.png",
"16": "ground_truth/hexagon/007_mask.png",
"17": "ground_truth/hexagon/008_mask.png",
"18": "ground_truth/hexagon/009_mask.png"
"masks": {
"3": "mask/colour/06.png",
"4": "mask/colour/03.png",
"5": "mask/colour/07.png",
"6": "mask/colour/14.png",
"7": "mask/colour/01.png",
"8": "mask/colour/12.png",
"9": "mask/colour/11.png",
"10": "mask/colour/09.png",
"11": "mask/colour/08.png"
}
}
61 changes: 39 additions & 22 deletions tests/assets/anomaly/classification/train.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
{
"image_path": {
"0": "train/good/000.png",
"1": "train/good/001.png",
"2": "train/good/002.png",
"3": "train/good/003.png",
"4": "train/good/004.png",
"5": "train/good/005.png",
"6": "train/good/006.png",
"7": "train/good/007.png",
"8": "train/good/008.png",
"9": "train/good/009.png",
"10": "train/good/010.png",
"11": "train/good/011.png",
"12": "train/good/012.png",
"13": "train/good/013.png",
"14": "train/good/014.png",
"15": "train/good/015.png",
"16": "train/good/016.png",
"17": "train/good/017.png",
"18": "train/good/018.png",
"19": "train/good/019.png"
"0": "train/good/06.jpg",
"1": "train/good/32.jpg",
"2": "train/good/00.jpg",
"3": "train/good/33.jpg",
"4": "train/good/21.jpg",
"5": "train/good/03.jpg",
"6": "train/good/07.jpg",
"7": "train/good/14.jpg",
"8": "train/good/17.jpg",
"9": "train/good/02.jpg",
"10": "train/good/30.jpg",
"11": "train/good/26.jpg",
"12": "train/good/19.jpg",
"13": "train/good/16.jpg",
"14": "train/good/01.jpg",
"15": "train/good/15.jpg",
"16": "train/good/31.jpg",
"17": "train/good/27.jpg",
"18": "train/good/29.jpg",
"19": "train/good/10.jpg",
"20": "train/good/20.jpg",
"21": "train/good/12.jpg",
"22": "train/good/11.jpg",
"23": "train/good/24.jpg",
"24": "train/good/09.jpg",
"25": "train/good/08.jpg",
"26": "train/good/22.jpg",
"27": "train/good/18.jpg"
},
"label": {
"0": "good",
Expand All @@ -41,6 +49,15 @@
"16": "good",
"17": "good",
"18": "good",
"19": "good"
}
"19": "good",
"20": "good",
"21": "good",
"22": "good",
"23": "good",
"24": "good",
"25": "good",
"26": "good",
"27": "good"
},
"masks": {}
}
60 changes: 29 additions & 31 deletions tests/assets/anomaly/classification/val.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
{
"image_path": {
"1": "test/good/000.png",
"2": "test/good/001.png",
"3": "test/good/002.png",
"4": "test/good/003.png",
"5": "test/star/000.png",
"6": "test/star/001.png",
"7": "test/star/002.png",
"8": "test/star/003.png",
"9": "test/hexagon/000.png",
"10": "test/hexagon/001.png",
"11": "test/hexagon/002.png",
"12": "test/hexagon/003.png"
"0": "test/good/13.jpg",
"1": "test/good/23.jpg",
"2": "test/good/04.jpg",
"3": "test/colour/13.jpg",
"4": "test/colour/00.jpg",
"5": "test/colour/05.jpg",
"6": "test/colour/02.jpg",
"7": "test/colour/16.jpg",
"8": "test/colour/15.jpg",
"9": "test/colour/10.jpg",
"10": "test/colour/04.jpg"
},
"label": {
"0": "good",
"1": "good",
"2": "good",
"3": "good",
"4": "good",
"5": "star",
"6": "star",
"7": "star",
"8": "star",
"9": "hexagon",
"10": "hexagon",
"11": "hexagon",
"12": "hexagon"
"3": "abnormal",
"4": "abnormal",
"5": "abnormal",
"6": "abnormal",
"7": "abnormal",
"8": "abnormal",
"9": "abnormal",
"10": "abnormal"
},
"mask_path": {
"5": "ground_truth/star/000_mask.png",
"6": "ground_truth/star/001_mask.png",
"7": "ground_truth/star/002_mask.png",
"8": "ground_truth/star/003_mask.png",
"9": "ground_truth/hexagon/000_mask.png",
"10": "ground_truth/hexagon/001_mask.png",
"11": "ground_truth/hexagon/002_mask.png",
"12": "ground_truth/hexagon/003_mask.png"
"masks": {
"3": "mask/colour/13.png",
"4": "mask/colour/00.png",
"5": "mask/colour/05.png",
"6": "mask/colour/02.png",
"7": "mask/colour/16.png",
"8": "mask/colour/15.png",
"9": "mask/colour/10.png",
"10": "mask/colour/04.png"
}
}
Loading

0 comments on commit 108b8c3

Please sign in to comment.