Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,13 +125,12 @@ def preprocess_image(image_array, session_id):
|
|
| 125 |
|
| 126 |
_model_cache['face_detector'] = face_detector
|
| 127 |
_model_cache['face_parser'] = face_parser
|
| 128 |
-
_model_cache['facer_module'] = facer.hwc2bchw
|
| 129 |
|
| 130 |
subprocess.run([
|
| 131 |
"python", "scripts/run_preprocessing.py", "--video_or_images_path", saved_image_path
|
| 132 |
], check=True, capture_output=True, text=True)
|
| 133 |
|
| 134 |
-
segment(f'{session_id}', _model_cache['face_detector'], _model_cache['face_parser']
|
| 135 |
|
| 136 |
crop_dir = os.path.join(os.environ["PIXEL3DMM_PREPROCESSED_DATA"], session_id, "cropped")
|
| 137 |
image = first_image_from_dir(crop_dir)
|
|
|
|
| 125 |
|
| 126 |
_model_cache['face_detector'] = face_detector
|
| 127 |
_model_cache['face_parser'] = face_parser
|
|
|
|
| 128 |
|
| 129 |
subprocess.run([
|
| 130 |
"python", "scripts/run_preprocessing.py", "--video_or_images_path", saved_image_path
|
| 131 |
], check=True, capture_output=True, text=True)
|
| 132 |
|
| 133 |
+
segment(f'{session_id}', _model_cache['face_detector'], _model_cache['face_parser'])
|
| 134 |
|
| 135 |
crop_dir = os.path.join(os.environ["PIXEL3DMM_PREPROCESSED_DATA"], session_id, "cropped")
|
| 136 |
image = first_image_from_dir(crop_dir)
|