Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -6,7 +6,7 @@ Research project backup for Latent Gradient Integrated Gradients (Latent GIG) -
|
|
| 6 |
|
| 7 |
```bash
|
| 8 |
# huggingface_hub 설치 (필요시)
|
| 9 |
-
pip install
|
| 10 |
|
| 11 |
# 다운로드
|
| 12 |
huggingface-cli download leekwoon/latent_gig_backup --repo-type dataset --local-dir ./latent_gig_data
|
|
@@ -24,10 +24,20 @@ cat data.tar.gz.part_* | tar -xzvf -
|
|
| 24 |
```
|
| 25 |
latent_gig/
|
| 26 |
├── cleanig/ # Core implementation modules
|
| 27 |
-
│ ├── explainer/ # Explainability algorithms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
│ ├── dataset/ # Dataset utilities (ImageNet, OxfordPet, OxfordFlower)
|
| 29 |
│ ├── classifier/ # Classifier utilities
|
| 30 |
-
│ ├── metric/ # Evaluation metrics (DiffID)
|
| 31 |
│ ├── mar_vae/ # MAR-VAE implementation
|
| 32 |
│ └── vae_wrapper.py # VAE wrapper for different models
|
| 33 |
├── configs/ # Configuration files
|
|
@@ -35,21 +45,32 @@ latent_gig/
|
|
| 35 |
│ ├── ig.yaml # Integrated Gradients config
|
| 36 |
│ ├── gig.yaml # Guided IG config
|
| 37 |
│ ├── agi.yaml # Adversarial GI config
|
|
|
|
|
|
|
| 38 |
│ ├── latent_gig.yaml # Latent GIG config
|
|
|
|
|
|
|
| 39 |
│ └── superpixel_gig.yaml
|
| 40 |
-
├──
|
| 41 |
-
│
|
|
|
|
| 42 |
├── results/ # Experiment results
|
| 43 |
│ ├── benchmark_diffid/ # DiffID benchmark results
|
| 44 |
-
│
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
├── scripts/ # Execution scripts
|
| 46 |
-
│ ├──
|
| 47 |
-
│ ├──
|
| 48 |
-
│ ├──
|
|
|
|
|
|
|
| 49 |
│ ├── analyze_results.py # Result analysis tool
|
| 50 |
-
│ └──
|
| 51 |
-
├──
|
| 52 |
-
└──
|
| 53 |
```
|
| 54 |
|
| 55 |
## Key Components
|
|
@@ -58,7 +79,11 @@ latent_gig/
|
|
| 58 |
- **IG (Integrated Gradients)**: Standard integrated gradients
|
| 59 |
- **GIG (Guided IG)**: Guided version with adversarial paths
|
| 60 |
- **AGI (Adversarial GI)**: Adversarial gradient integration
|
|
|
|
|
|
|
|
|
|
| 61 |
- **Latent GIG**: Our method using latent space paths with VAE models
|
|
|
|
| 62 |
|
| 63 |
### VAE Models Supported
|
| 64 |
- **SD1**: Stable Diffusion v1 VAE
|
|
@@ -70,9 +95,11 @@ latent_gig/
|
|
| 70 |
- ImageNet (subset)
|
| 71 |
- Oxford-IIIT Pet Dataset
|
| 72 |
- Oxford Flower Dataset
|
|
|
|
| 73 |
|
| 74 |
### Evaluation Metrics
|
| 75 |
-
- DiffID
|
|
|
|
| 76 |
- Insertion/Deletion curves
|
| 77 |
- Attribution quality metrics
|
| 78 |
|
|
|
|
| 6 |
|
| 7 |
```bash
|
| 8 |
# huggingface_hub 설치 (필요시)
|
| 9 |
+
pip install huggingface-hub==0.20.2
|
| 10 |
|
| 11 |
# 다운로드
|
| 12 |
huggingface-cli download leekwoon/latent_gig_backup --repo-type dataset --local-dir ./latent_gig_data
|
|
|
|
| 24 |
```
|
| 25 |
latent_gig/
|
| 26 |
├── cleanig/ # Core implementation modules
|
| 27 |
+
│ ├── explainer/ # Explainability algorithms
|
| 28 |
+
│ │ ├── ig.py # Integrated Gradients
|
| 29 |
+
│ │ ├── gig.py # Guided IG
|
| 30 |
+
│ │ ├── agi.py # Adversarial GI
|
| 31 |
+
│ │ ├── eig.py # Expected IG
|
| 32 |
+
│ │ ├── mig.py # Manifold IG
|
| 33 |
+
│ │ ├── saliency.py # Saliency maps
|
| 34 |
+
│ │ ├── latent_gig.py # Latent GIG (main method)
|
| 35 |
+
│ │ ├── soft_latent_gig.py
|
| 36 |
+
│ │ ├── superpixel_gig.py
|
| 37 |
+
│ │ └── smooth_wrapper.py
|
| 38 |
│ ├── dataset/ # Dataset utilities (ImageNet, OxfordPet, OxfordFlower)
|
| 39 |
│ ├── classifier/ # Classifier utilities
|
| 40 |
+
│ ├── metric/ # Evaluation metrics (DiffID, DiffROAR)
|
| 41 |
│ ├── mar_vae/ # MAR-VAE implementation
|
| 42 |
│ └── vae_wrapper.py # VAE wrapper for different models
|
| 43 |
├── configs/ # Configuration files
|
|
|
|
| 45 |
│ ├── ig.yaml # Integrated Gradients config
|
| 46 |
│ ├── gig.yaml # Guided IG config
|
| 47 |
│ ├── agi.yaml # Adversarial GI config
|
| 48 |
+
│ ├── eig.yaml # Expected IG config
|
| 49 |
+
│ ├── mig.yaml # Manifold IG config
|
| 50 |
│ ├── latent_gig.yaml # Latent GIG config
|
| 51 |
+
│ ├── smooth_*.yaml # Smooth variants (grad, ig, gig, latent_gig)
|
| 52 |
+
│ ├── saliency.yaml # Saliency config
|
| 53 |
│ └── superpixel_gig.yaml
|
| 54 |
+
├── data/ # Dataset files
|
| 55 |
+
│ ├── cifar-10-*/ # CIFAR-10 dataset
|
| 56 |
+
│ └── cifar-100-*/ # CIFAR-100 dataset
|
| 57 |
├── results/ # Experiment results
|
| 58 |
│ ├── benchmark_diffid/ # DiffID benchmark results
|
| 59 |
+
│ ├── benchmark_diffroar/ # DiffROAR benchmark results
|
| 60 |
+
│ ├── classifier_oxfordpet/ # Trained OxfordPet classifiers
|
| 61 |
+
│ ├── classifier_oxfordflower/ # Trained OxfordFlower classifiers
|
| 62 |
+
│ ├── tests/ # Test results with path visualizations
|
| 63 |
+
│ └── icml26_*/ # ICML26 experiment results
|
| 64 |
├── scripts/ # Execution scripts
|
| 65 |
+
│ ├── benchmark_diffid/ # DiffID benchmark scripts
|
| 66 |
+
│ ├── benchmark_diffroar/ # DiffROAR benchmark scripts
|
| 67 |
+
│ ├── tests/ # Test scripts
|
| 68 |
+
│ ├── diffid.py # DiffID evaluation
|
| 69 |
+
│ ├── diff_roar.py # DiffROAR evaluation
|
| 70 |
│ ├── analyze_results.py # Result analysis tool
|
| 71 |
+
│ └── upload_to_hf.sh # HuggingFace upload script
|
| 72 |
+
├── requirements.txt # Python dependencies
|
| 73 |
+
└── setup.py # Package setup
|
| 74 |
```
|
| 75 |
|
| 76 |
## Key Components
|
|
|
|
| 79 |
- **IG (Integrated Gradients)**: Standard integrated gradients
|
| 80 |
- **GIG (Guided IG)**: Guided version with adversarial paths
|
| 81 |
- **AGI (Adversarial GI)**: Adversarial gradient integration
|
| 82 |
+
- **EIG (Expected IG)**: Expected integrated gradients
|
| 83 |
+
- **MIG (Manifold IG)**: Manifold-based integrated gradients
|
| 84 |
+
- **Saliency**: Basic saliency maps
|
| 85 |
- **Latent GIG**: Our method using latent space paths with VAE models
|
| 86 |
+
- **Smooth variants**: SmoothGrad, SmoothIG, SmoothGIG, SmoothLatentGIG
|
| 87 |
|
| 88 |
### VAE Models Supported
|
| 89 |
- **SD1**: Stable Diffusion v1 VAE
|
|
|
|
| 95 |
- ImageNet (subset)
|
| 96 |
- Oxford-IIIT Pet Dataset
|
| 97 |
- Oxford Flower Dataset
|
| 98 |
+
- CIFAR-10, CIFAR-100
|
| 99 |
|
| 100 |
### Evaluation Metrics
|
| 101 |
+
- **DiffID**: Diffusion-based deletion metric
|
| 102 |
+
- **DiffROAR**: Diffusion-based ROAR metric
|
| 103 |
- Insertion/Deletion curves
|
| 104 |
- Attribution quality metrics
|
| 105 |
|