Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@
|
|
| 7 |
|
| 8 |
import sys
|
| 9 |
import os
|
| 10 |
-
|
| 11 |
os.system(f'pip install dlib')
|
| 12 |
import dlib
|
| 13 |
import argparse
|
|
@@ -222,7 +222,7 @@ def FSFM3C_image_detection(image):
|
|
| 222 |
image_results = f"The largest face in this image may be {max_prob_class} with probability: \n [{', '.join(probabilities)}]"
|
| 223 |
|
| 224 |
# Generate CAM heatmap for the detected class
|
| 225 |
-
use_cuda = torch.cuda.is_available()
|
| 226 |
input_tensor = preprocess_image(img,
|
| 227 |
mean=[0.5482207536697388, 0.42340534925460815, 0.3654651641845703],
|
| 228 |
std=[0.2789176106452942, 0.2438540756702423, 0.23493893444538116])
|
|
|
|
| 7 |
|
| 8 |
import sys
|
| 9 |
import os
|
| 10 |
+
os.system(f'pip install grad-cam')
|
| 11 |
os.system(f'pip install dlib')
|
| 12 |
import dlib
|
| 13 |
import argparse
|
|
|
|
| 222 |
image_results = f"The largest face in this image may be {max_prob_class} with probability: \n [{', '.join(probabilities)}]"
|
| 223 |
|
| 224 |
# Generate CAM heatmap for the detected class
|
| 225 |
+
use_cuda = torch.cuda.is_available()
|
| 226 |
input_tensor = preprocess_image(img,
|
| 227 |
mean=[0.5482207536697388, 0.42340534925460815, 0.3654651641845703],
|
| 228 |
std=[0.2789176106452942, 0.2438540756702423, 0.23493893444538116])
|