Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sg 996 add reports to s3 #173

Merged
merged 70 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
22791d8
first draft
Louis-Dupont Jun 29, 2023
731d109
first draft
Louis-Dupont Jul 5, 2023
f265ecd
add voc
Louis-Dupont Jul 5, 2023
373569e
messy
Louis-Dupont Jul 6, 2023
a3239e9
Merge branch 'master' into feature/SG-953-add_coco_detection
Louis-Dupont Jul 6, 2023
9925e2d
add doc
Louis-Dupont Jul 6, 2023
8dbbb73
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 6, 2023
009d97f
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 10, 2023
e71a102
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 10, 2023
244f0ac
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 10, 2023
4bd16fb
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 10, 2023
2e52efd
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 10, 2023
f9386a1
Merge branch 'master' into feature/SG-953-add_coco_detection
Louis-Dupont Jul 10, 2023
ed07ac6
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 10, 2023
d9af6c9
wip
Louis-Dupont Jul 10, 2023
7fab76a
fix segmentation onehot
Louis-Dupont Jul 10, 2023
9fc5431
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 10, 2023
ecda3d9
Merge branch 'master' into feature/SG-953-add_coco_detection
Louis-Dupont Jul 10, 2023
9e4b2ee
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 10, 2023
75a175e
remove unwanted changed
Louis-Dupont Jul 10, 2023
003b842
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 11, 2023
937da6c
ad ddoc
Louis-Dupont Jul 11, 2023
b84a9bf
Merge branch 'master' into feature/SG-953-add_coco_detection
BloodAxe Jul 11, 2023
93c6934
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 12, 2023
2824efc
add test
Louis-Dupont Jul 12, 2023
7208a95
add test batch
Louis-Dupont Jul 12, 2023
29ef565
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 13, 2023
d29c8ee
fixed empty page bug (#153)
ofrimasad Jul 12, 2023
9e65e01
fixed link in pdf (#154)
ofrimasad Jul 12, 2023
db34efc
Feature/dg 000 add to readme (#155)
ofrimasad Jul 12, 2023
37a7256
version bumped (#156)
shaydeci Jul 12, 2023
768fd45
Bugfix/sg 000 fix import type iterable (#157)
shaydeci Jul 12, 2023
da528cb
add test
Louis-Dupont Jul 13, 2023
b801e9e
Merge branch 'master' into feature/SG-953-add_coco_detection
Louis-Dupont Jul 13, 2023
091307e
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 19, 2023
aa99cca
add notebook example
Louis-Dupont Jul 19, 2023
98457ee
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 19, 2023
937ae7a
Merge branch 'master' into feature/SG-953-add_coco_detection
Louis-Dupont Jul 19, 2023
356dc69
add notebook
Louis-Dupont Jul 20, 2023
62e0e65
Merge branch 'master' into feature/SG-953-add_coco_detection
Louis-Dupont Jul 20, 2023
5e32c5c
add from
Louis-Dupont Jul 20, 2023
45a0576
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 20, 2023
4f0c550
rename to COCO
Louis-Dupont Jul 20, 2023
92519f5
fix test
Louis-Dupont Jul 20, 2023
7543cae
fix name
Louis-Dupont Jul 20, 2023
78107b5
fix
Louis-Dupont Jul 20, 2023
e418874
fix
Louis-Dupont Jul 20, 2023
1b6a9a3
Merge branch 'master' into feature/SG-953-add_coco_segmentation
Louis-Dupont Jul 23, 2023
d579bba
Merge branch 'feature/SG-953-add_coco_detection' into EXPLO/run_multi…
Louis-Dupont Jul 23, 2023
012fdd8
Merge branch 'EXPLO/run_multiple_datasets' into feature/SG-996-add_re…
Louis-Dupont Jul 23, 2023
041ac1c
wip
Louis-Dupont Jul 23, 2023
aa25a24
wip
Louis-Dupont Jul 25, 2023
018bff7
wip
Louis-Dupont Aug 7, 2023
71c4d5e
Merge branch 'master' into feature/SG-996-add_reports_to_s3
Louis-Dupont Aug 7, 2023
111b5c5
Merge branch 'master' into feature/SG-996-add_reports_to_s3
Louis-Dupont Aug 7, 2023
326cdb2
remove unwanted changes
Louis-Dupont Aug 7, 2023
cdc3809
add desc
Louis-Dupont Aug 7, 2023
1bffa47
remove unwanted change + fix
Louis-Dupont Aug 8, 2023
0ba8121
undo
Louis-Dupont Aug 8, 2023
4f31d55
Merge branch 'master' into feature/SG-996-add_reports_to_s3
Louis-Dupont Aug 8, 2023
3da335c
remove
Louis-Dupont Aug 8, 2023
76651f0
add docstrings
Louis-Dupont Aug 8, 2023
02ccabb
Merge branch 'master' into feature/SG-996-add_reports_to_s3
Louis-Dupont Aug 20, 2023
76af9a6
rename
Louis-Dupont Aug 20, 2023
007d868
improve nameing
Louis-Dupont Aug 20, 2023
e192703
Merge branch 'master' into feature/SG-996-add_reports_to_s3
Louis-Dupont Aug 20, 2023
ca528c1
fix scripts
Louis-Dupont Aug 20, 2023
1015b34
add precomputed examples to ReadMe
Louis-Dupont Aug 22, 2023
420d609
fix readme
Louis-Dupont Aug 22, 2023
10b4d96
fix
Louis-Dupont Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 232 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ and calibrate metrics to monitor your unique dataset.
- [Image Adapter](#image-adapter)
- [Label Adapter](#label-adapter)
- [Example](#example)
- [Pre-computed Dataset Analysis](#pre-computed-dataset-analysis)
- [License](#license)

## Features
Expand Down Expand Up @@ -262,6 +263,236 @@ SegmentationAnalysisManager(
)
```


## Pre-computed Dataset Analysis

<details>

<summary><h3>Detection</h3></summary>

Common Datasets

- [COCO](https://dgreports.deci.ai/detection/COCO/Report.pdf)

- [VOC](https://dgreports.deci.ai/detection/VOC/Report.pdf)

[Roboflow 100](https://universe.roboflow.com/roboflow-100?ref=blog.roboflow.com) Datasets

- [4-fold-defect](https://dgreports.deci.ai/detection/RF100_4-fold-defect/Report.pdf)

- [abdomen-mri](https://dgreports.deci.ai/detection/RF100_abdomen-mri/Report.pdf)

- [acl-x-ray](https://dgreports.deci.ai/detection/RF100_acl-x-ray/Report.pdf)

- [activity-diagrams-qdobr](https://dgreports.deci.ai/detection/RF100_activity-diagrams-qdobr/Report.pdf)

- [aerial-cows](https://dgreports.deci.ai/detection/RF100_aerial-cows/Report.pdf)

- [aerial-pool](https://dgreports.deci.ai/detection/RF100_aerial-pool/Report.pdf)

- [aerial-spheres](https://dgreports.deci.ai/detection/RF100_aerial-spheres/Report.pdf)

- [animals-ij5d2](https://dgreports.deci.ai/detection/RF100_animals-ij5d2/Report.pdf)

- [apex-videogame](https://dgreports.deci.ai/detection/RF100_apex-videogame/Report.pdf)

- [apples-fvpl5](https://dgreports.deci.ai/detection/RF100_apples-fvpl5/Report.pdf)

- [aquarium-qlnqy](https://dgreports.deci.ai/detection/RF100_aquarium-qlnqy/Report.pdf)

- [asbestos](https://dgreports.deci.ai/detection/RF100_asbestos/Report.pdf)

- [avatar-recognition-nuexe](https://dgreports.deci.ai/detection/RF100_avatar-recognition-nuexe/Report.pdf)

- [axial-mri](https://dgreports.deci.ai/detection/RF100_axial-mri/Report.pdf)

- [bacteria-ptywi](https://dgreports.deci.ai/detection/RF100_bacteria-ptywi/Report.pdf)

- [bccd-ouzjz](https://dgreports.deci.ai/detection/RF100_bccd-ouzjz/Report.pdf)

- [bees-jt5in](https://dgreports.deci.ai/detection/RF100_bees-jt5in/Report.pdf)

- [bone-fracture-7fylg](https://dgreports.deci.ai/detection/RF100_bone-fracture-7fylg/Report.pdf)

- [brain-tumor-m2pbp](https://dgreports.deci.ai/detection/RF100_brain-tumor-m2pbp/Report.pdf)

- [cable-damage](https://dgreports.deci.ai/detection/RF100_cable-damage/Report.pdf)

- [cables-nl42k](https://dgreports.deci.ai/detection/RF100_cables-nl42k/Report.pdf)

- [cavity-rs0uf](https://dgreports.deci.ai/detection/RF100_cavity-rs0uf/Report.pdf)

- [cell-towers](https://dgreports.deci.ai/detection/RF100_cell-towers/Report.pdf)

- [cells-uyemf](https://dgreports.deci.ai/detection/RF100_cells-uyemf/Report.pdf)

- [chess-pieces-mjzgj](https://dgreports.deci.ai/detection/RF100_chess-pieces-mjzgj/Report.pdf)

- [circuit-elements](https://dgreports.deci.ai/detection/RF100_circuit-elements/Report.pdf)

- [circuit-voltages](https://dgreports.deci.ai/detection/RF100_circuit-voltages/Report.pdf)

- [cloud-types](https://dgreports.deci.ai/detection/RF100_cloud-types/Report.pdf)

- [coins-1apki](https://dgreports.deci.ai/detection/RF100_coins-1apki/Report.pdf)

- [construction-safety-gsnvb](https://dgreports.deci.ai/detection/RF100_construction-safety-gsnvb/Report.pdf)

- [coral-lwptl](https://dgreports.deci.ai/detection/RF100_coral-lwptl/Report.pdf)

- [corrosion-bi3q3](https://dgreports.deci.ai/detection/RF100_corrosion-bi3q3/Report.pdf)

- [cotton-20xz5](https://dgreports.deci.ai/detection/RF100_cotton-20xz5/Report.pdf)

- [cotton-plant-disease](https://dgreports.deci.ai/detection/RF100_cotton-plant-disease/Report.pdf)

- [csgo-videogame](https://dgreports.deci.ai/detection/RF100_csgo-videogame/Report.pdf)

- [currency-v4f8j](https://dgreports.deci.ai/detection/RF100_currency-v4f8j/Report.pdf)

- [digits-t2eg6](https://dgreports.deci.ai/detection/RF100_digits-t2eg6/Report.pdf)

- [document-parts](https://dgreports.deci.ai/detection/RF100_document-parts/Report.pdf)

- [excavators-czvg9](https://dgreports.deci.ai/detection/RF100_excavators-czvg9/Report.pdf)

- [farcry6-videogame](https://dgreports.deci.ai/detection/RF100_farcry6-videogame/Report.pdf)

- [fish-market-ggjso](https://dgreports.deci.ai/detection/RF100_fish-market-ggjso/Report.pdf)

- [flir-camera-objects](https://dgreports.deci.ai/detection/RF100_flir-camera-objects/Report.pdf)

- [furniture-ngpea](https://dgreports.deci.ai/detection/RF100_furniture-ngpea/Report.pdf)

- [gauge-u2lwv](https://dgreports.deci.ai/detection/RF100_gauge-u2lwv/Report.pdf)

- [grass-weeds](https://dgreports.deci.ai/detection/RF100_grass-weeds/Report.pdf)

- [gynecology-mri](https://dgreports.deci.ai/detection/RF100_gynecology-mri/Report.pdf)

- [halo-infinite-angel-videogame](https://dgreports.deci.ai/detection/RF100_halo-infinite-angel-videogame/Report.pdf)

- [hand-gestures-jps7z](https://dgreports.deci.ai/detection/RF100_hand-gestures-jps7z/Report.pdf)

- [insects-mytwu](https://dgreports.deci.ai/detection/RF100_insects-mytwu/Report.pdf)

- [leaf-disease-nsdsr](https://dgreports.deci.ai/detection/RF100_leaf-disease-nsdsr/Report.pdf)

- [lettuce-pallets](https://dgreports.deci.ai/detection/RF100_lettuce-pallets/Report.pdf)

- [liver-disease](https://dgreports.deci.ai/detection/RF100_liver-disease/Report.pdf)

- [marbles](https://dgreports.deci.ai/detection/RF100_marbles/Report.pdf)

- [mask-wearing-608pr](https://dgreports.deci.ai/detection/RF100_mask-wearing-608pr/Report.pdf)

- [mitosis-gjs3g](https://dgreports.deci.ai/detection/RF100_mitosis-gjs3g/Report.pdf)

- [number-ops](https://dgreports.deci.ai/detection/RF100_number-ops/Report.pdf)

- [paper-parts](https://dgreports.deci.ai/detection/RF100_paper-parts/Report.pdf)

- [paragraphs-co84b](https://dgreports.deci.ai/detection/RF100_paragraphs-co84b/Report.pdf)

- [parasites-1s07h](https://dgreports.deci.ai/detection/RF100_parasites-1s07h/Report.pdf)

- [peanuts-sd4kf](https://dgreports.deci.ai/detection/RF100_peanuts-sd4kf/Report.pdf)

- [peixos-fish](https://dgreports.deci.ai/detection/RF100_peixos-fish/Report.pdf)

- [people-in-paintings](https://dgreports.deci.ai/detection/RF100_people-in-paintings/Report.pdf)

- [pests-2xlvx](https://dgreports.deci.ai/detection/RF100_pests-2xlvx/Report.pdf)

- [phages](https://dgreports.deci.ai/detection/RF100_phages/Report.pdf)

- [pills-sxdht](https://dgreports.deci.ai/detection/RF100_pills-sxdht/Report.pdf)

- [poker-cards-cxcvz](https://dgreports.deci.ai/detection/RF100_poker-cards-cxcvz/Report.pdf)

- [printed-circuit-board](https://dgreports.deci.ai/detection/RF100_printed-circuit-board/Report.pdf)

- [radio-signal](https://dgreports.deci.ai/detection/RF100_radio-signal/Report.pdf)

- [road-signs-6ih4y](https://dgreports.deci.ai/detection/RF100_road-signs-6ih4y/Report.pdf)

- [road-traffic](https://dgreports.deci.ai/detection/RF100_road-traffic/Report.pdf)

- [robomasters-285km](https://dgreports.deci.ai/detection/RF100_robomasters-285km/Report.pdf)

- [secondary-chains](https://dgreports.deci.ai/detection/RF100_secondary-chains/Report.pdf)

- [sedimentary-features-9eosf](https://dgreports.deci.ai/detection/RF100_sedimentary-features-9eosf/Report.pdf)

- [shark-teeth-5atku](https://dgreports.deci.ai/detection/RF100_shark-teeth-5atku/Report.pdf)

- [sign-language-sokdr](https://dgreports.deci.ai/detection/RF100_sign-language-sokdr/Report.pdf)

- [signatures-xc8up](https://dgreports.deci.ai/detection/RF100_signatures-xc8up/Report.pdf)

- [smoke-uvylj](https://dgreports.deci.ai/detection/RF100_smoke-uvylj/Report.pdf)

- [soccer-players-5fuqs](https://dgreports.deci.ai/detection/RF100_soccer-players-5fuqs/Report.pdf)

- [soda-bottles](https://dgreports.deci.ai/detection/RF100_soda-bottles/Report.pdf)

- [solar-panels-taxvb](https://dgreports.deci.ai/detection/RF100_solar-panels-taxvb/Report.pdf)

- [stomata-cells](https://dgreports.deci.ai/detection/RF100_stomata-cells/Report.pdf)

- [street-work](https://dgreports.deci.ai/detection/RF100_street-work/Report.pdf)

- [tabular-data-wf9uh](https://dgreports.deci.ai/detection/RF100_tabular-data-wf9uh/Report.pdf)

- [team-fight-tactics](https://dgreports.deci.ai/detection/RF100_team-fight-tactics/Report.pdf)

- [thermal-cheetah-my4dp](https://dgreports.deci.ai/detection/RF100_thermal-cheetah-my4dp/Report.pdf)

- [thermal-dogs-and-people-x6ejw](https://dgreports.deci.ai/detection/RF100_thermal-dogs-and-people-x6ejw/Report.pdf)

- [trail-camera](https://dgreports.deci.ai/detection/RF100_trail-camera/Report.pdf)

- [truck-movement](https://dgreports.deci.ai/detection/RF100_truck-movement/Report.pdf)

- [tweeter-posts](https://dgreports.deci.ai/detection/RF100_tweeter-posts/Report.pdf)

- [tweeter-profile](https://dgreports.deci.ai/detection/RF100_tweeter-profile/Report.pdf)

- [underwater-objects-5v7p8](https://dgreports.deci.ai/detection/RF100_underwater-objects-5v7p8/Report.pdf)

- [underwater-pipes-4ng4t](https://dgreports.deci.ai/detection/RF100_underwater-pipes-4ng4t/Report.pdf)

- [uno-deck](https://dgreports.deci.ai/detection/RF100_uno-deck/Report.pdf)

- [valentines-chocolate](https://dgreports.deci.ai/detection/RF100_valentines-chocolate/Report.pdf)

- [vehicles-q0x2v](https://dgreports.deci.ai/detection/RF100_vehicles-q0x2v/Report.pdf)

- [wall-damage](https://dgreports.deci.ai/detection/RF100_wall-damage/Report.pdf)

- [washroom-rf1fa](https://dgreports.deci.ai/detection/RF100_washroom-rf1fa/Report.pdf)

- [weed-crop-aerial](https://dgreports.deci.ai/detection/RF100_weed-crop-aerial/Report.pdf)

- [wine-labels](https://dgreports.deci.ai/detection/RF100_wine-labels/Report.pdf)

- [x-ray-rheumatology](https://dgreports.deci.ai/detection/RF100_x-ray-rheumatology/Report.pdf)

</details>


<details>

<summary><h3>Segmentation</h3></summary>

- [COCO](https://dgreports.deci.ai/segmentation/COCO/Report.pdf)

- [Cityspace](https://dgreports.deci.ai/segmentation/Cityspace/Report.pdf)

- [VOC](https://dgreports.deci.ai/segmentation/VOC/Report.pdf)

</details>

## Community
<table style="border: 0">
<tr>
Expand All @@ -272,4 +503,4 @@ SegmentationAnalysisManager(

## License

This project is released under the [Apache 2.0 license](LICENSE.md).
This project is released under the [Apache 2.0 license](https://dgreports.deci.ai/detection/LICENSE.md).
71 changes: 71 additions & 0 deletions scripts/generate_reports_detection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
"""
Script for INTERNAL USE ONLY.
Generate a list of reports for detection datasets.
The script requires a clear dataset directory structures and will not work in environments not setup the same way.
"""

import os
from data_gradients.managers.detection_manager import DetectionAnalysisManager

from data_gradients.feature_extractors import (
SummaryStats,
ImagesResolution,
ImageColorDistribution,
ImagesAverageBrightness,
ImageDuplicates,
DetectionSampleVisualization,
DetectionClassHeatmap,
DetectionBoundingBoxArea,
DetectionBoundingBoxPerImageCount,
DetectionBoundingBoxSize,
DetectionClassFrequency,
DetectionClassesPerImageCount,
DetectionBoundingBoxIoU,
)


def _get_all_report_features(train_image_dir: str, valid_image_dir: str):
"""Features defined manually in order to dynamically define `ImageDuplicates(train_image_dir=..., valid_image_dir=...)`"""
features = [
SummaryStats(),
ImagesResolution(),
ImageColorDistribution(),
ImagesAverageBrightness(),
ImageDuplicates(train_image_dir=train_image_dir, valid_image_dir=valid_image_dir),
DetectionSampleVisualization(n_rows=3, n_cols=4, stack_splits_vertically=True),
DetectionClassHeatmap(n_rows=6, n_cols=2, heatmap_shape=(200, 200)),
DetectionBoundingBoxArea(topk=30, prioritization_mode="train_val_diff"),
DetectionBoundingBoxPerImageCount(),
DetectionBoundingBoxSize(),
DetectionClassFrequency(topk=30, prioritization_mode="train_val_diff"),
DetectionClassesPerImageCount(topk=30, prioritization_mode="train_val_diff"),
DetectionBoundingBoxIoU(num_bins=10, class_agnostic=True),
]
return features


if __name__ == "__main__":

DetectionAnalysisManager.analyze_coco(
root_dir="/data/coco",
year=2017,
report_title="COCO",
feature_extractors=_get_all_report_features(train_image_dir="/data/coco/images/train2017/", valid_image_dir="/data/coco/images/val2017/"),
)

# VOC dataset does not clearly split the train/valid sets so we cannot run duplicate analysis
DetectionAnalysisManager.analyze_voc(root_dir="/data/voc/VOCdevkit", year=2012, report_title="VOC")

# Running on all the Roboflow100 datasets
for dataset_name in os.listdir("/data/rf100"):
dataset_path = os.path.join("/data/rf100", dataset_name)

DetectionAnalysisManager.analyze_coco_format(
root_dir=dataset_path,
feature_extractors=_get_all_report_features(train_image_dir=f"{dataset_path}/train/", valid_image_dir=f"{dataset_path}/valid/"),
train_images_subdir="train",
train_annotation_file_path="train/_annotations.coco.json",
val_images_subdir="valid",
val_annotation_file_path="valid/_annotations.coco.json",
report_title=f"DET RF100 {dataset_name}",
)
72 changes: 72 additions & 0 deletions scripts/generate_reports_segmentation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
"""
Script for INTERNAL USE ONLY.
Generate a list of reports for segmentation datasets.
The script requires a clear dataset directory structures and will not work in environments not setup the same way.
"""

from data_gradients.managers.segmentation_manager import SegmentationAnalysisManager
from super_gradients.training.dataloaders import cityscapes_train, cityscapes_val

from data_gradients.feature_extractors import (
SummaryStats,
ImagesResolution,
ImageColorDistribution,
ImagesAverageBrightness,
ImageDuplicates,
SegmentationBoundingBoxArea,
SegmentationBoundingBoxResolution,
SegmentationClassFrequency,
SegmentationClassHeatmap,
SegmentationClassesPerImageCount,
SegmentationComponentsConvexity,
SegmentationComponentsPerImageCount,
SegmentationSampleVisualization,
)


def _get_all_report_features(train_image_dir: str, valid_image_dir: str):
"""Features defined manually in order to dynamically define `ImageDuplicates(train_image_dir=..., valid_image_dir=...)`"""
features = [
SummaryStats(),
ImagesResolution(),
ImageColorDistribution(),
ImagesAverageBrightness(),
ImageDuplicates(train_image_dir=train_image_dir, valid_image_dir=valid_image_dir),
SegmentationSampleVisualization(n_rows=3, n_cols=3, stack_splits_vertically=True, stack_mask_vertically=True),
SegmentationClassHeatmap(n_rows=6, n_cols=2, heatmap_shape=(200, 200)),
SegmentationClassFrequency(topk=30, prioritization_mode="train_val_diff"),
SegmentationClassesPerImageCount(topk=30, prioritization_mode="train_val_diff"),
SegmentationComponentsPerImageCount(),
SegmentationBoundingBoxResolution(),
SegmentationBoundingBoxArea(topk=30, prioritization_mode="train_val_diff"),
SegmentationComponentsConvexity(),
]
return features


if __name__ == "__main__":

SegmentationAnalysisManager.analyze_coco(
root_dir="/data/coco",
year=2017,
report_title="SEG COCO",
feature_extractors=_get_all_report_features(train_image_dir="/data/coco/images/train2017/", valid_image_dir="/data/coco/images/val2017/"),
)

# VOC dataset does not clearly split the train/valid sets so we cannot run duplicate analysis
SegmentationAnalysisManager.analyze_voc(
root_dir="/data/voc/VOCdevkit",
year=2012,
report_title="SEG VOC",
)

# Cityscape does not support image duplicate out of the box because it is made of multiple image sets
trainset = cityscapes_train()
val_set = cityscapes_val()
SegmentationAnalysisManager(
train_data=trainset,
val_data=val_set,
report_title="SEG Cityspace",
class_names=trainset.dataset.classes + ["Ignore"],
feature_extractors=_get_all_report_features(train_image_dir="/data/coco/images/train2017/", valid_image_dir="/data/coco/images/val2017/"),
).run()
Loading