You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the EfficientAD torch_model.py, Decoder object has no attribute 'img_size' and trainer.fit() fails.
In my opinion "self.img_size= img_size" is missing from the init function.
I encountered this issue using efficientad with the 001_getting_started notebook.
Dataset
MVTec
Model
Other (please specify in the field below)
Steps to reproduce the behavior
EfficientAD
anomalib/src/anomalib/models/efficientad/torch_model.py
line 144
self.image_size is missing. it should be assigned in the Decoder init function (self.image_size = image_size).
OS information
OS information:
OS: [e.g. Ubuntu 20.04]
Python version: [e.g. 3.8.10]
Anomalib version: [e.g. 0.3.6]
PyTorch version: [e.g. 1.9.0]
CUDA/cuDNN version: [e.g. 11.1]
GPU models and configuration: [e.g. 2x GeForce RTX 3090]
Any other relevant information: [e.g. I'm using a custom dataset]
Expected behavior
trainer.fit should work using the 001_getting_started notebook but it doesn't.
dataset:
name: mvtecformat: mvtecpath: ./datasets/MVTeccategory: woodtask: segmentationtrain_batch_size: 1eval_batch_size: 16num_workers: 8image_size: 256# dimensions to which images are resized (mandatory)center_crop: null # dimensions to which images are center-cropped after resizing (optional)normalization: none # data distribution to which the images will be normalized: [none, imagenet]transform_config:
train: nulleval: nulltest_split_mode: from_dir # options: [from_dir, synthetic]test_split_ratio: 0.2# fraction of train images held out testing (usage depends on test_split_mode)val_split_mode: same_as_test # options: [same_as_test, from_test, synthetic]val_split_ratio: 0.5# fraction of train/test images held out for validation (usage depends on val_split_mode)model:
name: efficientadteacher_out_channels: 384model_size: medium # options: [small, medium]lr: 0.0001weight_decay: 0.00001padding: true# generic paramsnormalization_method: min_max # options: [null, min_max, cdf]metrics:
image:
- F1Score
- AUROCpixel:
- F1Score
- AUROCthreshold:
method: adaptive #options: [adaptive, manual]manual_image: nullmanual_pixel: nullvisualization:
show_images: False # show images on the screensave_images: True # save images to the file systemlog_images: False # log images to the available loggers (if any)image_save_path: null # path to which images will be savedmode: full # options: ["full", "simple"]project:
seed: 42path: ./resultslogging:
logger: [] # options: [comet, tensorboard, wandb, csv] or combinations.log_graph: false # Logs the model graph to respective logger.optimization:
export_mode: null # options: torch, onnx, openvino# PL Trainer Args. Don't add extra parameter here.trainer:
enable_checkpointing: truedefault_root_dir: nullgradient_clip_val: 0gradient_clip_algorithm: normnum_nodes: 1devices: 1enable_progress_bar: trueoverfit_batches: 0.0track_grad_norm: -1check_val_every_n_epoch: 1fast_dev_run: falseaccumulate_grad_batches: 1max_epochs: 200min_epochs: nullmax_steps: -1min_steps: nullmax_time: nulllimit_train_batches: 1.0limit_val_batches: 1.0limit_test_batches: 1.0limit_predict_batches: 1.0val_check_interval: 1.0log_every_n_steps: 50accelerator: auto # <"cpu", "gpu", "tpu", "ipu", "hpu", "auto">strategy: nullsync_batchnorm: falseprecision: 32enable_model_summary: truenum_sanity_val_steps: 0profiler: nullbenchmark: falsedeterministic: falsereload_dataloaders_every_n_epochs: 0auto_lr_find: falsereplace_sampler_ddp: truedetect_anomaly: falseauto_scale_batch_size: falseplugins: nullmove_metrics_to_cpu: falsemultiple_trainloader_mode: max_size_cycle
Logs
AttributeError: 'Decoder' object has no attribute 'img_size'
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
AlessandroPolidori
changed the title
[Bug]: image_size class attribute missing
[Bug]: EfficientAD Decoder image_size class attribute missing
Jun 9, 2023
Describe the bug
In the EfficientAD torch_model.py, Decoder object has no attribute 'img_size' and trainer.fit() fails.
In my opinion "self.img_size= img_size" is missing from the init function.
I encountered this issue using efficientad with the 001_getting_started notebook.
Dataset
MVTec
Model
Other (please specify in the field below)
Steps to reproduce the behavior
EfficientAD
anomalib/src/anomalib/models/efficientad/torch_model.py
line 144
self.image_size is missing. it should be assigned in the Decoder init function (self.image_size = image_size).
OS information
OS information:
Expected behavior
trainer.fit should work using the 001_getting_started notebook but it doesn't.
Screenshots
No response
Pip/GitHub
GitHub
What version/branch did you use?
main EfficientAD (#1073)
Configuration YAML
Logs
Code of Conduct
The text was updated successfully, but these errors were encountered: