Update app.py
Browse files
app.py
CHANGED
|
@@ -239,11 +239,9 @@ def _get_face_embedding(
|
|
| 239 |
emb = emb / np.linalg.norm(emb)
|
| 240 |
embeddings.append(emb.astype(float).tolist())
|
| 241 |
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
except:
|
| 246 |
-
pass
|
| 247 |
|
| 248 |
if torch.cuda.is_available():
|
| 249 |
torch.cuda.empty_cache()
|
|
|
|
| 239 |
emb = emb / np.linalg.norm(emb)
|
| 240 |
embeddings.append(emb.astype(float).tolist())
|
| 241 |
|
| 242 |
+
|
| 243 |
+
del mtcnn
|
| 244 |
+
del facenet
|
|
|
|
|
|
|
| 245 |
|
| 246 |
if torch.cuda.is_available():
|
| 247 |
torch.cuda.empty_cache()
|