pyfaceau 1.3.7__tar.gz → 1.3.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyfaceau-1.3.7/pyfaceau.egg-info → pyfaceau-1.3.9}/PKG-INFO +1 -1
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/__init__.py +1 -1
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/processor.py +23 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9/pyfaceau.egg-info}/PKG-INFO +1 -1
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyproject.toml +1 -1
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/LICENSE +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/MANIFEST.in +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/README.md +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/alignment/__init__.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/alignment/calc_params.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/alignment/face_aligner.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/alignment/numba_calcparams_accelerator.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/alignment/paw.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/config.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/data/__init__.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/data/hdf5_dataset.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/data/quality_filter.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/data/training_data_generator.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/detectors/__init__.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/detectors/extract_mtcnn_weights.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/detectors/openface_mtcnn.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/detectors/pfld.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/detectors/pymtcnn_detector.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/detectors/retinaface.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/download_weights.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/features/__init__.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/features/histogram_median_tracker.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/features/pdm.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/features/triangulation.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/nn/__init__.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/nn/au_prediction_inference.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/nn/au_prediction_net.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/nn/fast_pipeline.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/nn/landmark_pose_inference.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/nn/landmark_pose_net.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/nn/train_au_prediction.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/nn/train_landmark_pose.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/parallel_pipeline.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/pipeline.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/prediction/__init__.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/prediction/au_predictor.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/prediction/batched_au_predictor.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/prediction/model_parser.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/prediction/online_au_correction.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/prediction/running_median.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/prediction/running_median_fallback.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/refinement/__init__.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/refinement/pdm.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/refinement/svr_patch_expert.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/refinement/targeted_refiner.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/utils/__init__.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/utils/cython_extensions/cython_histogram_median.pyx +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/utils/cython_extensions/cython_rotation_update.pyx +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/utils/cython_extensions/setup.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau.egg-info/SOURCES.txt +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau.egg-info/dependency_links.txt +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau.egg-info/entry_points.txt +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau.egg-info/not-zip-safe +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau.egg-info/requires.txt +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau.egg-info/top_level.txt +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau_gui.py +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/requirements.txt +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/setup.cfg +0 -0
- {pyfaceau-1.3.7 → pyfaceau-1.3.9}/setup.py +0 -0
|
@@ -5,7 +5,7 @@ A complete Python implementation of OpenFace 2.2's AU extraction pipeline
|
|
|
5
5
|
with high-performance parallel processing support and CLNF landmark refinement.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "1.
|
|
8
|
+
__version__ = "1.3.9"
|
|
9
9
|
|
|
10
10
|
from .pipeline import FullPythonAUPipeline
|
|
11
11
|
from .parallel_pipeline import ParallelAUPipeline
|
|
@@ -165,6 +165,8 @@ class OpenFaceProcessor:
|
|
|
165
165
|
- stored_features list (can be up to 56 MB for long videos)
|
|
166
166
|
- running median histograms
|
|
167
167
|
- face tracking cache
|
|
168
|
+
- CLNF temporal state
|
|
169
|
+
- MPS/CUDA GPU memory
|
|
168
170
|
|
|
169
171
|
This should be called between videos to prevent memory accumulation.
|
|
170
172
|
"""
|
|
@@ -183,6 +185,27 @@ class OpenFaceProcessor:
|
|
|
183
185
|
self.pipeline.detection_failures = 0
|
|
184
186
|
self.pipeline.frames_since_detection = 0
|
|
185
187
|
|
|
188
|
+
# Reset CLNF temporal state and clear GPU caches
|
|
189
|
+
if hasattr(self.pipeline, 'clnf') and self.pipeline.clnf is not None:
|
|
190
|
+
self.pipeline.clnf.reset_temporal_state()
|
|
191
|
+
# Clear GPU memory caches (added in pyclnf 0.3.3)
|
|
192
|
+
if hasattr(self.pipeline.clnf, 'clear_gpu_cache'):
|
|
193
|
+
self.pipeline.clnf.clear_gpu_cache()
|
|
194
|
+
|
|
195
|
+
# Release GPU memory (MPS for Apple Silicon, CUDA for NVIDIA)
|
|
196
|
+
try:
|
|
197
|
+
import torch
|
|
198
|
+
if torch.backends.mps.is_available():
|
|
199
|
+
torch.mps.empty_cache()
|
|
200
|
+
elif torch.cuda.is_available():
|
|
201
|
+
torch.cuda.empty_cache()
|
|
202
|
+
except Exception:
|
|
203
|
+
pass # Ignore if torch not available
|
|
204
|
+
|
|
205
|
+
# Force garbage collection
|
|
206
|
+
import gc
|
|
207
|
+
gc.collect()
|
|
208
|
+
|
|
186
209
|
|
|
187
210
|
def process_videos(
|
|
188
211
|
directory_path: str,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/utils/cython_extensions/cython_histogram_median.pyx
RENAMED
|
File without changes
|
{pyfaceau-1.3.7 → pyfaceau-1.3.9}/pyfaceau/utils/cython_extensions/cython_rotation_update.pyx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|