TensorFlow Datasets for Defect Detection
To directly jump into the code look at the sample notebook
Install
Create a new python=3.9 env and install tfds_defect_detection from pip
pip install tfds_defect_detection
Examples
import tfds_defect_detection as tfd
tfd.load()
Usage
All parmeters
import tfds_defect_detection as tfd
impor albumentations as A
ds = tfd.load(
names = ("mvtec", "visa"),
data_dir=Path("."),
pairing_mode = "result_with_contrastive_pair", # "result_only", "result_with_original"
create_artificial_anomalies=True,
validation_split=0.2,
subset_mode = "training", # "validation", "test", "holdout", None
drop_masks=False,
width=256,
height=256,
repeat=True,
anomaly_size = None,
global_transform=A.Compose([
A.RandomBrightnessContrast(),
A.HueSaturationValue(),
]),
process_deviation=A.Compose([
A.ShiftScaleRotate(
shift_limit=0.01,
scale_limit=0.0,
rotate_limit=1.5,
p=1
),
A.Blur(blur_limit=3),
A.RandomBrightnessContrast(),
A.RandomGamma(),
A.HueSaturationValue(),
]),
anomaly_composition=A.Compose([
A.RandomRotate90(),
A.Transpose(),
A.ShiftScaleRotate(
shift_limit=0.0625,
scale_limit=0.50,
rotate_limit=45, p=1
),
A.RandomGamma(),
A.OpticalDistortion(),
A.GridDistortion(),
A.RandomContrast(0.5, p=1),
]),
batch_size=9,
seed=123,
shuffle=True,
peek=True,
image_validation=False,
delete_tmp=True,
crop_to_aspect_ratio=True
)
Metadata
Release files for tfds-defect-detection 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tfds_defect_detection-1.0.0.tar.gz | 19.4 kB | Without provenance | Details for tfds_defect_detection-1.0.0.tar.gz |
Release files / tfds_defect_detection-1.0.0.tar.gz
| Download URL | tfds_defect_detection-1.0.0.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65a903fd2491f2e42bdb04453f6bc3ab6b099cb1a63b07ff8cdb85bc35bf7598
|
|
BLAKE2b-256 checksum How to use checksums |
70b3ef458615ff67df146bedbc07f891920727a545cd4759e3d82eabd78c540c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.5
|
Security for tfds-defect-detection 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.