Spaces:
Sleeping
Sleeping
Commit ·
ac74eea
1
Parent(s): bad515d
Changed GradCAM layer
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ data = "data.yaml"
|
|
| 20 |
# Load model
|
| 21 |
device = select_device('cpu')
|
| 22 |
model = DetectMultiBackend(weights, device=device, dnn=False, data=data, fp16=False)
|
| 23 |
-
target_layers =
|
| 24 |
|
| 25 |
false_detection_data = glob(os.path.join("false_detection", '*.jpg'))
|
| 26 |
false_detection_data = [x.replace('\\', '/') for x in false_detection_data]
|
|
|
|
| 20 |
# Load model
|
| 21 |
device = select_device('cpu')
|
| 22 |
model = DetectMultiBackend(weights, device=device, dnn=False, data=data, fp16=False)
|
| 23 |
+
target_layers = model.model.model[-1]
|
| 24 |
|
| 25 |
false_detection_data = glob(os.path.join("false_detection", '*.jpg'))
|
| 26 |
false_detection_data = [x.replace('\\', '/') for x in false_detection_data]
|