OBA-Research commited on
Commit
8edd35a
·
verified ·
1 Parent(s): 9bbb9e4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -1
README.md CHANGED
@@ -82,6 +82,8 @@ pip install vaas
82
 
83
  ## Usage
84
 
 
 
85
  ```python
86
  from vaas.inference.pipeline import VAASPipeline
87
  from PIL import Image
@@ -99,7 +101,7 @@ print(result["S_H"])
99
  anomaly_map = result["anomaly_map"]
100
  ```
101
 
102
- ### Output Format
103
 
104
  ```python
105
  {
@@ -110,6 +112,32 @@ anomaly_map = result["anomaly_map"]
110
  }
111
  ```
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  ---
114
 
115
  ## Model Files
 
82
 
83
  ## Usage
84
 
85
+ ### Basic inference
86
+
87
  ```python
88
  from vaas.inference.pipeline import VAASPipeline
89
  from PIL import Image
 
101
  anomaly_map = result["anomaly_map"]
102
  ```
103
 
104
+ #### Output Format
105
 
106
  ```python
107
  {
 
112
  }
113
  ```
114
 
115
+ ### Inference with visual explanation
116
+
117
+ VAAS can also generate a qualitative visualization combining:
118
+
119
+ * Patch-level anomaly heatmaps (Px)
120
+ * Global attention maps (Fx)
121
+ * Final hybrid anomaly score (S_H)
122
+
123
+ ```python
124
+ pipeline.visualize(
125
+ image="image.jpg",
126
+ save_path="vaas_visualization.png",
127
+ mode="all", # options: "all", "px", "binary", "fx"
128
+ threshold=0.5,
129
+ )
130
+ ```
131
+
132
+ This will save a figure containing:
133
+
134
+ * Original image
135
+ * Patch-level anomaly overlays
136
+ * Global attention overlays
137
+ * A gauge-style visualization of the hybrid anomaly score
138
+
139
+ ![Inference with visual example](./methodology.png)
140
+
141
  ---
142
 
143
  ## Model Files