revert to model.predict(outputs)
This commit is contained in:
parent
7d13dc4d38
commit
56f55674bf
@ -36,7 +36,6 @@
|
|||||||
Pose2Sim.filtering()
|
Pose2Sim.filtering()
|
||||||
Pose2Sim.markerAugmentation()
|
Pose2Sim.markerAugmentation()
|
||||||
# Then run OpenSim (see Readme.md)
|
# Then run OpenSim (see Readme.md)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
Functions shared between modules, and other utilities
|
Functions shared between modules, and other utilities
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
## INIT
|
## INIT
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
OUTPUT:
|
OUTPUT:
|
||||||
- a filtered trc file
|
- a filtered trc file
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ INPUTS:
|
|||||||
|
|
||||||
OUTPUT:
|
OUTPUT:
|
||||||
- a filtered trc file
|
- a filtered trc file
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
@ -186,7 +185,7 @@ def augmentTRC(config_dict):
|
|||||||
json_file.close()
|
json_file.close()
|
||||||
model = tf.keras.models.model_from_json(pretrainedModel_json)
|
model = tf.keras.models.model_from_json(pretrainedModel_json)
|
||||||
model.load_weights(os.path.join(augmenterModelDir, "weights.h5"))
|
model.load_weights(os.path.join(augmenterModelDir, "weights.h5"))
|
||||||
outputs = model(inputs)
|
outputs = model.predict(inputs)
|
||||||
tf.keras.backend.clear_session()
|
tf.keras.backend.clear_session()
|
||||||
|
|
||||||
# %% Post-process outputs.
|
# %% Post-process outputs.
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
OUTPUTS:
|
OUTPUTS:
|
||||||
- json files for each camera with only one person of interest
|
- json files for each camera with only one person of interest
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
OUTPUTS:
|
OUTPUTS:
|
||||||
- a .trc file with 3D coordinates in Y-up system coordinates
|
- a .trc file with 3D coordinates in Y-up system coordinates
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ import cv2
|
|||||||
import toml
|
import toml
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
from scipy import interpolate
|
from scipy import interpolate
|
||||||
from collections import Counter, OrderedDict
|
from collections import Counter
|
||||||
from anytree import RenderTree
|
from anytree import RenderTree
|
||||||
from anytree.importer import DictImporter
|
from anytree.importer import DictImporter
|
||||||
import logging
|
import logging
|
||||||
@ -762,7 +761,7 @@ def triangulate_all(config):
|
|||||||
try:
|
try:
|
||||||
Q_tot[n] = Q_tot[n].apply(interpolate_zeros_nans, axis=0, args = [interp_gap_smaller_than, interpolation_kind])
|
Q_tot[n] = Q_tot[n].apply(interpolate_zeros_nans, axis=0, args = [interp_gap_smaller_than, interpolation_kind])
|
||||||
except:
|
except:
|
||||||
logging.info(f'Interpolation was not possible for person {n}. This means that the not enough points are available, which is often due to a bad calibration.')
|
logging.info(f'Interpolation was not possible for person {n}. This means that not enough points are available, which is often due to a bad calibration.')
|
||||||
# Q_tot.replace(np.nan, 0, inplace=True)
|
# Q_tot.replace(np.nan, 0, inplace=True)
|
||||||
|
|
||||||
# Create TRC file
|
# Create TRC file
|
||||||
|
Loading…
Reference in New Issue
Block a user