task_name: train tags: - dev train: true test: true ckpt_path: null seed: 2025 data: _target_: src.data.anomaly_clip_datamodule.AnomalyCLIPDataModule data_dir: train: /home/hzx/Projects/Data/Visa valid: /home/hzx/Projects/Data/MVTec-AD test: /home/hzx/Projects/Data/MVTec-AD dataset: train: _target_: src.data.components.anomal_dataset.VisaDataset _partial_: true transform: _target_: src.data.components.transform.ImageTransform image_size: 336 mask_transform: _target_: src.data.components.transform.MaskTransform image_size: ${data.image_size} preload: false valid: _target_: src.data.components.anomal_dataset.MVTecDataset _partial_: true transform: _target_: src.data.components.transform.ImageTransform image_size: 336 mask_transform: _target_: src.data.components.transform.MaskTransform image_size: ${data.image_size} preload: false aug_rate: 0.0 test: _target_: src.data.components.anomal_dataset.MVTecDataset _partial_: true transform: _target_: src.data.components.transform.ImageTransform image_size: 336 mask_transform: _target_: src.data.components.transform.MaskTransform image_size: ${data.image_size} preload: false aug_rate: 0.0 kshot: _target_: src.data.components.kshot_dataset.MVTecKShotDataset _partial_: true k_shot: 1 transform: _target_: src.data.components.transform.ImageTransform image_size: 336 mask_transform: _target_: src.data.components.transform.MaskTransform image_size: ${data.image_size} preload: false image_size: 336 num_workers: 4 pin_memory: false batch_size: 8 model: _target_: src.models.anomaly_clip_module.AnomalyCLIPModule optimizer: _target_: torch.optim.AdamW _partial_: true lr: 0.001 weight_decay: 0.2 scheduler: _target_: torch.optim.lr_scheduler.ReduceLROnPlateau _partial_: true mode: min factor: 0.1 patience: 5 net: _target_: src.models.components.anomaly_clip.AnomalyCLIP arch: ViT-L/14@336px image_size: 336 class_names: - object temperature: 0.05 prompt_length: 24 context_length: 77 truncate: false feature_map_idx: - 5 - 11 - 17 - 23 share_weight: false state_template: normal: - '{}' anomaly: - damaged {} tokenizer: _target_: src.models.components.clip.simple_tokenizer.SimpleTokenizer adapter: _target_: src.models.components.adapter.BasicLayer _partial_: true input_resolution: - 24 - 24 window_size: 6 depth: 1 num_heads: 8 hidden_features: null cpb_dim: 64 value_only: true drop: 0.0 attn_drop: 0.2 loss: cross_entropy: _target_: torch.nn.CrossEntropyLoss focal: _target_: src.models.components.loss.FocalLoss dice: _target_: src.models.components.loss.BinaryDiceLoss k_shot: false enable_validation: false compile: false callbacks: model_checkpoint: _target_: lightning.pytorch.callbacks.ModelCheckpoint dirpath: ${paths.output_dir}/checkpoints filename: epoch_{epoch:03d} monitor: train/loss verbose: false save_last: true save_top_k: 1 mode: min auto_insert_metric_name: false save_weights_only: false every_n_train_steps: null train_time_interval: null every_n_epochs: null save_on_train_epoch_end: null early_stopping: _target_: lightning.pytorch.callbacks.EarlyStopping monitor: train/loss min_delta: 0.0 patience: 10 verbose: false mode: min strict: true check_finite: true stopping_threshold: null divergence_threshold: null check_on_train_epoch_end: null model_summary: _target_: lightning.pytorch.callbacks.RichModelSummary max_depth: -1 rich_progress_bar: _target_: lightning.pytorch.callbacks.RichProgressBar visualization: _target_: src.models.components.callback.AnomalyVisualizationCallback dirpath: ${paths.output_dir}/visualizations visualize: true visulization: dirpath: ${paths.output_dir}/visualizations visualize: true logger: wandb: _target_: lightning.pytorch.loggers.wandb.WandbLogger save_dir: ${paths.output_dir} offline: false id: null anonymous: null project: mvt_optuna log_model: false prefix: '' group: '' tags: [] job_type: '' trainer: _target_: lightning.pytorch.trainer.Trainer default_root_dir: ${paths.output_dir} min_epochs: 1 max_epochs: 2 accelerator: gpu devices: 1 check_val_every_n_epoch: 1 deterministic: false paths: root_dir: ${oc.env:PROJECT_ROOT} data_dir: ${paths.root_dir}/data/ log_dir: ${paths.root_dir}/logs/ output_dir: ${hydra:runtime.output_dir} work_dir: ${hydra:runtime.cwd} extras: ignore_warnings: false enforce_tags: true print_config: true optimized_metric: test/objective