This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # DiOodMi 학습 설정 예시 | |
| # 사용법: hae train --config train.yaml | |
| # | |
| # 이 파일을 train.yaml로 복사한 후 경로를 수정하세요: | |
| # cp train.yaml.example train.yaml | |
| version: "1.0" | |
| # ============================================================================= | |
| # 데이터셋 설정 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def find_optimal_threshold(y_true, y_scores, priority='sensitivity', min_value=0.95): | |
| """ | |
| Find optimal threshold with constrained optimization. | |
| Parameters | |
| ---------- | |
| y_true : array-like | |
| Ground truth labels (0 or 1) | |
| y_scores : array-like | |
| Predicted probabilities or continuous scores |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Prediction Analyzer Script for MVTec-style Prediction Results | |
| This script analyzes image predictions organized in folder structures, | |
| generates summary CSVs, confusion matrices, and performance metrics. | |
| Usage: | |
| python analyze_predictions.py --predictions-dir /path/to/predictions | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Consolidated Anomaly Detector with Batched TTA | |
| This module provides a modern, consolidated implementation of anomaly detection | |
| with DeCo-Diff using efficient batched Test-Time Augmentation (TTA). | |
| Key Features: | |
| - Combined Batch TTA: Processes B images × N shifts together (~6.6× speedup) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { lib, config, options, pkgs, ... }: | |
| with lib; | |
| let cfg = config.services.chrome-remote-desktop; | |
| in { | |
| options.services.chrome-remote-desktop = { | |
| enable = mkEnableOption "Chrome Remote Desktop"; | |
| user = mkOption { | |
| type = types.str; | |
| description = '' | |
| A user which the service will run as. |