Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Apr 25, 2024
1 parent c42cc7d commit ff81d06
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 20 deletions.
34 changes: 17 additions & 17 deletions batch_run/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"overwrite_config": True,
"update_project_paths": True,
"initialize_visualization": False,
"use_GPU": False,
"use_GPU": True,
"random_seed": 0,
"verbose": 2,
},
Expand Down Expand Up @@ -84,16 +84,16 @@
},
},
"PointTracker": {
"contiguous": False,
"contiguous": True,
"params_optical_flow": {
"method": "lucas_kanade",
"mesh_rigidity": 0.025,
"mesh_n_neighbors": 8,
"mesh_rigidity": 0.045,
"mesh_n_neighbors": 12,
"relaxation": 0.0015,
"kwargs_method": {
"winSize": [
20,
20,
25,
25,
],
"maxLevel": 2,
"criteria": [
Expand All @@ -110,19 +110,19 @@
},
"params_outlier_handling": {
"threshold_displacement": 150,
"framesHalted_before": 10,
"framesHalted_after": 10,
"framesHalted_before": 40,
"framesHalted_after": 40,
},
"verbose": 2,
},
"VQT_Analyzer": {
"params_VQT": {
"Q_lowF": 4,
"Q_highF": 10,
"Q_lowF": 3,
"Q_highF": 5,
"F_min": 1.0,
"F_max": 60,
"n_freq_bins": 36,
"win_size": 501,
"win_size": 701,
"symmetry": 'left',
"taper_asymmetric": True,
"plot_pref": False,
Expand Down Expand Up @@ -163,7 +163,7 @@
"fit": {
"method": "CP_NN_HALS",
"params_method": {
"rank": 12,
"rank": 10,
"n_iter_max": 200,
"init": "random",
"svd": "truncated_svd",
Expand Down Expand Up @@ -241,12 +241,12 @@
#SBATCH --job-name={name_slurm}
#SBATCH --output={path}
#SBATCH --constraint=intel
#SBATCH --gres=gpu:1,vram:23G
#SBATCH --partition=gpu_requeue
#SBATCH -c 4
#SBATCH --partition=gpu_quad
#SBATCH --gres=gpu:1,vram:31G
#SBATCH -c 8
#SBATCH -n 1
#SBATCH --mem=36GB
#SBATCH --time=0-0:30:00
#SBATCH --mem=48GB
#SBATCH --time=0-7:30:00
unset XDG_RUNTIME_DIR
Expand Down
6 changes: 3 additions & 3 deletions face_rhythm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@


## Prepare cv2.imshow
import pkg_resources
installed_packages = {pkg.key for pkg in pkg_resources.working_set}
import importlib.metadata
installed_packages = {dist.metadata['Name'] for dist in importlib.metadata.distributions()}
has_cv2_headless = 'opencv-contrib-python-headless' in installed_packages
has_cv2_normal = 'opencv-contrib-python' in installed_packages
if has_cv2_normal and not has_cv2_headless:
Expand Down Expand Up @@ -66,4 +66,4 @@ def prepare_cv2_imshow():
exec('from . import ' + pkg)


__version__ = '0.2.4'
__version__ = '0.2.5'
14 changes: 14 additions & 0 deletions face_rhythm/spectral_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ class VQT_Analyzer(FR_Module):
displacement traces. The spectrograms are generated using
the Variable Q-Transform (VQT) algorithm.
RH 2022
Args:
params_VQT (dict):
A dictionary of parameters to pass to the VQT class (Variable
Q-Transform) in helpers.py.
normalization_factor (float):
A float between 0 and 1 to normalize the spectrograms. 0 means no
normalization. 1 means every time point has the same power.
spectrogram_exponent (float):
A float to raise the spectrogram to before normalizing.
one_over_f_exponent (float):
A float to raise the frequency axis to before doing 1/f correction.
verbose (int):
An integer to control the verbosity of the class.
"""
def __init__(
self,
Expand Down

0 comments on commit ff81d06

Please sign in to comment.