Merge branch 'main' of http://www.lambdax.cn:7180/liangsen/audio-driven-face-animation into main
This commit is contained in:
commit
17e12ec39f
16 files changed
+403
-316
No files matched your search
@@ -7,15 +7,17 @@ from pathlib2 import Path
|
||||
from face_alignment import FaceAlignment, LandmarksType
|
||||
from zmq import device
|
||||
|
||||
import os, sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from common.logger import Logger
|
||||
|
||||
class ImagesDataset(Dataset):
|
||||
def __init__(self, path_folder:Path):
|
||||
|
||||
self.path_folder = path_folder
|
||||
self.list_image = sorted(path_folder.glob("*.jpg"), reverse=False)
|
||||
print(f"Have {len(self.list_image)} images, like {self.list_image[:3]}")
|
||||
logger.info(f"Have {len(self.list_image)} images, like {self.list_image[:3]}")
|
||||
|
||||
|
||||
def __len__(self):
|
||||
return len(self.list_image)
|
||||
|
||||
@@ -28,36 +30,51 @@ class ImagesDataset(Dataset):
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
path_data = Path("/ssdata1/lsen/DATA/Actor5/processing")
|
||||
actor = "Actor7"
|
||||
sub_folder = "processing" # smile, processing, processing2
|
||||
device = "cuda:1"
|
||||
|
||||
# logger
|
||||
path_log = Path(f"./data/{actor}")
|
||||
path_log.mkdir(parents=True, exist_ok=True)
|
||||
logger = Logger(path_log, postfix=f"detect-lm68-{sub_folder}")
|
||||
|
||||
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_data.mkdir(parents=True, exist_ok=True)
|
||||
vpath_videos = sorted(path_data.glob("*"), reverse=True)
|
||||
print(f"Have {len(vpath_videos)} dir files")
|
||||
logger.info(f"Have {len(vpath_videos)} dir files")
|
||||
|
||||
|
||||
device = "cuda:7"
|
||||
model = FaceAlignment(LandmarksType._2D, device=device, face_detector='sfd')
|
||||
print(f"load FaceAlignment model in {device}")
|
||||
logger.info(f"load FaceAlignment model in {device}")
|
||||
|
||||
# IDs = ["2-23min"]
|
||||
# for each word
|
||||
for i, ipath_item in enumerate(vpath_videos[16:]):
|
||||
for i, ipath_item in enumerate(vpath_videos[:16]):
|
||||
iname = ipath_item.stem
|
||||
print(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
logger.info(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
|
||||
# if iname not in IDs: continue
|
||||
|
||||
ipath_infor = ipath_item.joinpath("video/info.json")
|
||||
ipath_ldmks = ipath_item.joinpath("landmarks_FAN")
|
||||
ipath_frame = ipath_item.joinpath("frames")
|
||||
ipath_ldmks.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
# check
|
||||
num_frame = len(list(ipath_frame.glob("*.jpg")))
|
||||
# check frame have exsit
|
||||
if num_frame < 50:
|
||||
logger.info(f"\n Skip: num_frame = {num_frame} is small!")
|
||||
continue
|
||||
|
||||
# check have done
|
||||
num_ladmk = len(list(ipath_ldmks.glob("*.txt")))
|
||||
if num_frame == num_ladmk:
|
||||
print(f"\n Skip: have already done!")
|
||||
logger.info(f"\n Skip: have already done!")
|
||||
continue
|
||||
|
||||
|
||||
prev_ldmk = None
|
||||
dataset = ImagesDataset(ipath_frame)
|
||||
dloader = DataLoader(dataset, batch_size=16, num_workers=8)
|
||||
|
||||
@@ -65,18 +82,43 @@ if __name__ == "__main__":
|
||||
ibatch_name = ibatch["image_name"]
|
||||
ibatch_data = ibatch["image"].to(device) # B x H x W x 3
|
||||
ibatch_data = ibatch_data.permute(0, 3, 1, 2) # B x H x W x 3
|
||||
# print(f"ibatch_data shape = {ibatch_data.shape}, path={ibatch_name[:3]}")
|
||||
# logger.info(f"ibatch_data shape = {ibatch_data.shape}, path={ibatch_name[:3]}")
|
||||
if k%100 == 0:
|
||||
print(f"batching {k}/{len(dloader)} ... ")
|
||||
logger.info(f"batching {k}/{len(dloader)} ... ")
|
||||
|
||||
pred = model.get_landmarks_from_batch(ibatch_data, return_landmark_score=False)
|
||||
# print(f"pred len = {len(pred)}, type= {type(pred)}, [0] shape={pred[0].shape}")
|
||||
# logger.info(f"pred len = {len(pred)}, type= {type(pred)}, [0] shape={pred[0].shape}")
|
||||
|
||||
# save landmarks
|
||||
for jldmk, jname in zip(pred, ibatch_name):
|
||||
jpath_ldmk = ipath_ldmks.joinpath(jname + ".txt")
|
||||
|
||||
# if have multipe-landmarks
|
||||
if jldmk.shape[0] > 68:
|
||||
logger.info(f"ERROR: > use first 68-kpts, cropped_ldmk = {jldmk.shape}, jpath_ldmk={jpath_ldmk}")
|
||||
|
||||
max_cos = 0
|
||||
kpt_selected = None
|
||||
if prev_ldmk is None:
|
||||
kpt_selected = jldmk[:68]
|
||||
else:
|
||||
n_kpt = jldmk.shape[0] // 68
|
||||
for idx in range(n_kpt):
|
||||
cur_kpt = jldmk[idx*68:(idx+1)*68, :]
|
||||
cur_cos = np.dot(prev_ldmk, cur_kpt.reshape(-1)) / (np.linalg.norm(prev_ldmk) * np.linalg.norm(cur_kpt.reshape(-1)))
|
||||
if cur_cos > max_cos:
|
||||
max_cos = cur_cos
|
||||
kpt_selected = cur_kpt
|
||||
|
||||
# get jldmk, which match the prev_landmarks
|
||||
logger.info(f"\t SELETCT: max_cos = {max_cos} --> {kpt_selected.reshape(-1)[::10]}")
|
||||
jldmk = kpt_selected
|
||||
|
||||
# record prev
|
||||
prev_ldmk = jldmk.copy().reshape(-1) # record prev_ldmk
|
||||
|
||||
# save ldmks
|
||||
assert jldmk.shape[0] == 68, f"jldmak shape = {jldmk.shape}, should be 68! "
|
||||
np.savetxt(jpath_ldmk, jldmk, fmt=" %3d")
|
||||
|
||||
|
||||
|
||||
# break
|
||||
@@ -7,15 +7,17 @@ from pathlib2 import Path
|
||||
from face_alignment import FaceAlignment, LandmarksType
|
||||
from zmq import device
|
||||
|
||||
import os, sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from common.logger import Logger
|
||||
|
||||
class ImagesDataset(Dataset):
|
||||
def __init__(self, path_folder:Path):
|
||||
|
||||
self.path_folder = path_folder
|
||||
self.list_image = sorted(path_folder.glob("*.jpg"), reverse=False)
|
||||
print(f"Have {len(self.list_image)} images, like {self.list_image[:3]}")
|
||||
logger.info(f"Have {len(self.list_image)} images, like {self.list_image[:3]}")
|
||||
|
||||
|
||||
def __len__(self):
|
||||
return len(self.list_image)
|
||||
|
||||
@@ -28,36 +30,51 @@ class ImagesDataset(Dataset):
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
path_data = Path("/ssdata1/lsen/DATA/Actor5/processing")
|
||||
actor = "Actor6"
|
||||
sub_folder = "processing" # smile, processing, processing2
|
||||
device = "cuda:1"
|
||||
|
||||
# logger
|
||||
path_log = Path(f"./data/{actor}")
|
||||
path_log.mkdir(parents=True, exist_ok=True)
|
||||
logger = Logger(path_log, postfix=f"detect-lm68-{sub_folder}")
|
||||
|
||||
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_data.mkdir(parents=True, exist_ok=True)
|
||||
vpath_videos = sorted(path_data.glob("*"), reverse=True)
|
||||
print(f"Have {len(vpath_videos)} dir files")
|
||||
logger.info(f"Have {len(vpath_videos)} dir files")
|
||||
|
||||
|
||||
device = "cuda:7"
|
||||
model = FaceAlignment(LandmarksType._2D, device=device, face_detector='sfd')
|
||||
print(f"load FaceAlignment model in {device}")
|
||||
logger.info(f"load FaceAlignment model in {device}")
|
||||
|
||||
# IDs = ["2-23min"]
|
||||
# for each word
|
||||
for i, ipath_item in enumerate(vpath_videos[16:]):
|
||||
for i, ipath_item in enumerate(vpath_videos[:16]):
|
||||
iname = ipath_item.stem
|
||||
print(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
logger.info(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
|
||||
# if iname not in IDs: continue
|
||||
|
||||
ipath_infor = ipath_item.joinpath("video/info.json")
|
||||
ipath_ldmks = ipath_item.joinpath("landmarks_FAN")
|
||||
ipath_frame = ipath_item.joinpath("frames")
|
||||
ipath_ldmks.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
# check
|
||||
num_frame = len(list(ipath_frame.glob("*.jpg")))
|
||||
# check frame have exsit
|
||||
if num_frame < 50:
|
||||
logger.info(f"\n Skip: num_frame = {num_frame} is small!")
|
||||
continue
|
||||
|
||||
# check have done
|
||||
num_ladmk = len(list(ipath_ldmks.glob("*.txt")))
|
||||
if num_frame == num_ladmk:
|
||||
print(f"\n Skip: have already done!")
|
||||
logger.info(f"\n Skip: have already done!")
|
||||
continue
|
||||
|
||||
|
||||
prev_ldmk = None
|
||||
dataset = ImagesDataset(ipath_frame)
|
||||
dloader = DataLoader(dataset, batch_size=16, num_workers=8)
|
||||
|
||||
@@ -65,18 +82,43 @@ if __name__ == "__main__":
|
||||
ibatch_name = ibatch["image_name"]
|
||||
ibatch_data = ibatch["image"].to(device) # B x H x W x 3
|
||||
ibatch_data = ibatch_data.permute(0, 3, 1, 2) # B x H x W x 3
|
||||
# print(f"ibatch_data shape = {ibatch_data.shape}, path={ibatch_name[:3]}")
|
||||
# logger.info(f"ibatch_data shape = {ibatch_data.shape}, path={ibatch_name[:3]}")
|
||||
if k%100 == 0:
|
||||
print(f"batching {k}/{len(dloader)} ... ")
|
||||
logger.info(f"batching {k}/{len(dloader)} ... ")
|
||||
|
||||
pred = model.get_landmarks_from_batch(ibatch_data, return_landmark_score=False)
|
||||
# print(f"pred len = {len(pred)}, type= {type(pred)}, [0] shape={pred[0].shape}")
|
||||
# logger.info(f"pred len = {len(pred)}, type= {type(pred)}, [0] shape={pred[0].shape}")
|
||||
|
||||
# save landmarks
|
||||
for jldmk, jname in zip(pred, ibatch_name):
|
||||
jpath_ldmk = ipath_ldmks.joinpath(jname + ".txt")
|
||||
|
||||
# if have multipe-landmarks
|
||||
if jldmk.shape[0] > 68:
|
||||
logger.info(f"ERROR: > use first 68-kpts, cropped_ldmk = {jldmk.shape}, jpath_ldmk={jpath_ldmk}")
|
||||
|
||||
max_cos = 0
|
||||
kpt_selected = None
|
||||
if prev_ldmk is None:
|
||||
kpt_selected = jldmk[:68]
|
||||
else:
|
||||
n_kpt = jldmk.shape[0] // 68
|
||||
for idx in range(n_kpt):
|
||||
cur_kpt = jldmk[idx*68:(idx+1)*68, :]
|
||||
cur_cos = np.dot(prev_ldmk, cur_kpt.reshape(-1)) / (np.linalg.norm(prev_ldmk) * np.linalg.norm(cur_kpt.reshape(-1)))
|
||||
if cur_cos > max_cos:
|
||||
max_cos = cur_cos
|
||||
kpt_selected = cur_kpt
|
||||
|
||||
# get jldmk, which match the prev_landmarks
|
||||
logger.info(f"\t SELETCT: max_cos = {max_cos} --> {kpt_selected.reshape(-1)[::10]}")
|
||||
jldmk = kpt_selected
|
||||
|
||||
# record prev
|
||||
prev_ldmk = jldmk.copy().reshape(-1) # record prev_ldmk
|
||||
|
||||
# save ldmks
|
||||
assert jldmk.shape[0] == 68, f"jldmak shape = {jldmk.shape}, should be 68! "
|
||||
np.savetxt(jpath_ldmk, jldmk, fmt=" %3d")
|
||||
|
||||
|
||||
|
||||
# break
|
||||
@@ -0,0 +1,66 @@
|
||||
# The data processing pipline
|
||||
|
||||
|
||||
### Folder Tree
|
||||
```
|
||||
cwd:
|
||||
├── data
|
||||
│ ├── Actor7Data
|
||||
│ │ ├── pipline.md
|
||||
│ │ ├── run-00-prepare-data.py
|
||||
│ │ ├── run-01-detect-lm68.py
|
||||
│ │ ├── run-01-mean-bbox.py
|
||||
│ │ ├── run-02-crop-transform-2.py
|
||||
│ │ ├── run-02-crop-transform.py
|
||||
│ │ ├── run-09-remove-files.py
|
||||
│ │ ├── run-10-generate-mask.py
|
||||
│ │ ├── run-20-deca-reconstruction.py
|
||||
│ │ ├── run-21-features-3dmm.py
|
||||
│ │ ├── run-22-concat-3dmm.py
|
||||
│ │ ├── run-23-mean-coeff.py
|
||||
│ │ ├── run-41-train-annodb-audio2mesh.py
|
||||
│ │ └── run-42-train-annodb-ganrender.py
|
||||
|
||||
data_path:
|
||||
/mfs/lsen/DATA/Actor7/processing/4R3A0200/
|
||||
├── audio
|
||||
├── frames # STEP-0结果,保存视频帧(1080p)
|
||||
├── landmarks_FAN # STEP-1结果,保存1080p图像对应的landmark
|
||||
└── video
|
||||
|
||||
```
|
||||
|
||||
|
||||
### STEP-0: 保存视频帧
|
||||
|
||||
- 需要旋转video(如果是横着拍摄的话)
|
||||
- FPS需要保证是50,(否则会进行FPS转码)
|
||||
- cut前后15s的调焦/准备拍摄片段
|
||||
- 跳过小于1分钟的视频
|
||||
- 保存到`{data_path}/frames`文件夹中
|
||||
|
||||
```
|
||||
python run-01-prepare-data.py
|
||||
```
|
||||
|
||||
|
||||
### STEP-1: 检测关键点
|
||||
|
||||
- 使用`face_alignment`库中的`sfd`检测算法
|
||||
- 若检测到多个face landmarks,智能选择最接近 prev-landmarks的那个
|
||||
- 保存到`{data_path}/landmarks_FAN`文件夹中
|
||||
|
||||
``` python
|
||||
python run-01-detect-lm68.py
|
||||
```
|
||||
|
||||
### STEP-2: 获取全局bbox
|
||||
|
||||
- 用于后期crop image
|
||||
- 遍历所有的frame,选择一个最大的bbox,以覆盖所以的人脸运动区域
|
||||
- 数据保存在`./data/{actor}/max_bbox_{sub_folder}.npy`中
|
||||
|
||||
```
|
||||
python run-01-mean-bbox.py
|
||||
```
|
||||
|
||||
File renamed without changes.
@@ -7,13 +7,16 @@ from pathlib2 import Path
|
||||
from face_alignment import FaceAlignment, LandmarksType
|
||||
from zmq import device
|
||||
|
||||
import os, sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from common.logger import Logger
|
||||
|
||||
class ImagesDataset(Dataset):
|
||||
def __init__(self, path_folder:Path):
|
||||
|
||||
self.path_folder = path_folder
|
||||
self.list_image = sorted(path_folder.glob("*.jpg"), reverse=False)
|
||||
print(f"Have {len(self.list_image)} images, like {self.list_image[:3]}")
|
||||
logger.info(f"Have {len(self.list_image)} images, like {self.list_image[:3]}")
|
||||
|
||||
def __len__(self):
|
||||
return len(self.list_image)
|
||||
@@ -27,36 +30,51 @@ class ImagesDataset(Dataset):
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
path_data = Path("/ssdata1/lsen/DATA/Actor5/processing")
|
||||
vpath_videos = sorted(path_data.glob("*"), reverse=True)
|
||||
print(f"Have {len(vpath_videos)} dir files")
|
||||
actor = "Actor7"
|
||||
sub_folder = "processing" # smile, processing, processing2
|
||||
device = "cuda:0"
|
||||
|
||||
# logger
|
||||
path_log = Path(f"./data/{actor}")
|
||||
path_log.mkdir(parents=True, exist_ok=True)
|
||||
logger = Logger(path_log, postfix=f"detect-lm68-{sub_folder}")
|
||||
|
||||
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_data.mkdir(parents=True, exist_ok=True)
|
||||
vpath_videos = sorted(path_data.glob("*"), reverse=False)
|
||||
logger.info(f"Have {len(vpath_videos)} dir files")
|
||||
|
||||
|
||||
device = "cuda:7"
|
||||
model = FaceAlignment(LandmarksType._2D, device=device, face_detector='sfd')
|
||||
print(f"load FaceAlignment model in {device}")
|
||||
logger.info(f"load FaceAlignment model in {device}")
|
||||
|
||||
# IDs = ["2-23min"]
|
||||
# for each word
|
||||
for i, ipath_item in enumerate(vpath_videos[16:]):
|
||||
for i, ipath_item in enumerate(vpath_videos):
|
||||
iname = ipath_item.stem
|
||||
print(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
logger.info(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
|
||||
# if iname not in IDs: continue
|
||||
|
||||
ipath_infor = ipath_item.joinpath("video/info.json")
|
||||
ipath_ldmks = ipath_item.joinpath("landmarks_FAN")
|
||||
ipath_frame = ipath_item.joinpath("frames")
|
||||
ipath_ldmks.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
# check
|
||||
num_frame = len(list(ipath_frame.glob("*.jpg")))
|
||||
# check frame have exsit
|
||||
if num_frame < 50:
|
||||
logger.info(f"\n Skip: num_frame = {num_frame} is small!")
|
||||
continue
|
||||
|
||||
# check have done
|
||||
num_ladmk = len(list(ipath_ldmks.glob("*.txt")))
|
||||
if num_frame == num_ladmk:
|
||||
print(f"\n Skip: have already done!")
|
||||
logger.info(f"\n Skip: have already done!")
|
||||
continue
|
||||
|
||||
|
||||
prev_ldmk = None
|
||||
dataset = ImagesDataset(ipath_frame)
|
||||
dloader = DataLoader(dataset, batch_size=16, num_workers=8)
|
||||
|
||||
@@ -64,18 +82,43 @@ if __name__ == "__main__":
|
||||
ibatch_name = ibatch["image_name"]
|
||||
ibatch_data = ibatch["image"].to(device) # B x H x W x 3
|
||||
ibatch_data = ibatch_data.permute(0, 3, 1, 2) # B x H x W x 3
|
||||
# print(f"ibatch_data shape = {ibatch_data.shape}, path={ibatch_name[:3]}")
|
||||
# logger.info(f"ibatch_data shape = {ibatch_data.shape}, path={ibatch_name[:3]}")
|
||||
if k%100 == 0:
|
||||
print(f"batching {k}/{len(dloader)} ... ")
|
||||
logger.info(f"batching {k}/{len(dloader)} ... ")
|
||||
|
||||
pred = model.get_landmarks_from_batch(ibatch_data, return_landmark_score=False)
|
||||
# print(f"pred len = {len(pred)}, type= {type(pred)}, [0] shape={pred[0].shape}")
|
||||
# logger.info(f"pred len = {len(pred)}, type= {type(pred)}, [0] shape={pred[0].shape}")
|
||||
|
||||
# save landmarks
|
||||
for jldmk, jname in zip(pred, ibatch_name):
|
||||
jpath_ldmk = ipath_ldmks.joinpath(jname + ".txt")
|
||||
|
||||
# if have multipe-landmarks
|
||||
if jldmk.shape[0] > 68:
|
||||
logger.info(f"ERROR: > use first 68-kpts, cropped_ldmk = {jldmk.shape}, jpath_ldmk={jpath_ldmk}")
|
||||
|
||||
max_cos = 0
|
||||
kpt_selected = None
|
||||
if prev_ldmk is None:
|
||||
kpt_selected = jldmk[:68]
|
||||
else:
|
||||
n_kpt = jldmk.shape[0] // 68
|
||||
for idx in range(n_kpt):
|
||||
cur_kpt = jldmk[idx*68:(idx+1)*68, :]
|
||||
cur_cos = np.dot(prev_ldmk, cur_kpt.reshape(-1)) / (np.linalg.norm(prev_ldmk) * np.linalg.norm(cur_kpt.reshape(-1)))
|
||||
if cur_cos > max_cos:
|
||||
max_cos = cur_cos
|
||||
kpt_selected = cur_kpt
|
||||
|
||||
# get jldmk, which match the prev_landmarks
|
||||
logger.info(f"\t SELETCT: max_cos = {max_cos} --> {kpt_selected.reshape(-1)[::10]}")
|
||||
jldmk = kpt_selected
|
||||
|
||||
# record prev
|
||||
prev_ldmk = jldmk.copy().reshape(-1) # record prev_ldmk
|
||||
|
||||
# save ldmks
|
||||
assert jldmk.shape[0] == 68, f"jldmak shape = {jldmk.shape}, should be 68! "
|
||||
np.savetxt(jpath_ldmk, jldmk, fmt=" %3d")
|
||||
|
||||
|
||||
|
||||
# break
|
||||
@@ -31,13 +31,18 @@ def bbox2point(left, right, top, bottom, type='bbox'):
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
actor = "Actor7"
|
||||
sub_folder = "processing" # processing, processing2
|
||||
|
||||
path_data = Path(f"/ssdata1/lsen/DATA/Actor6/{sub_folder}")
|
||||
# logger
|
||||
path_log = Path(f"./data/{actor}")
|
||||
path_log.mkdir(parents=True, exist_ok=True)
|
||||
logger = Logger(path_log, postfix=f"max-bbox-{sub_folder}")
|
||||
|
||||
|
||||
logger = Logger("./data/Actor6", postfix=f"max_bbox_{sub_folder}")
|
||||
path_mean_bbox = Path(f"./data/Actor6/max_bbox_{sub_folder}.npy")
|
||||
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_mean_bbox = Path(f"./data/{actor}/max_bbox_{sub_folder}.npy")
|
||||
|
||||
vpath_videos = sorted(path_data.glob("*"), reverse=True)
|
||||
logger.info(f"Have {len(vpath_videos)} dir files")
|
||||
@@ -57,24 +62,18 @@ if __name__ == "__main__":
|
||||
|
||||
# check
|
||||
vpath_ldmks = list(ipath_ldmks.glob("*.txt"))
|
||||
|
||||
kmean_bbox = []
|
||||
for k, kpath_ldmk in enumerate(vpath_ldmks):
|
||||
# if k%1000 == 0:
|
||||
# logger.info(f"batching {k}/{len(vpath_ldmks)} ... ")
|
||||
|
||||
|
||||
kpt = np.loadtxt(kpath_ldmk) # (68, 2)
|
||||
|
||||
if kpt.shape[0] > 68:
|
||||
kpt = kpt[:68, :]
|
||||
logger.info(f"ERROR: > use first 68-kpts, kpt = {kpt.shape} ipath_ldmk={kpath_ldmk}")
|
||||
assert kpt.shape[0] == 68, f"ERROR: > kpt = {kpt.shape} should be 68, ipath_ldmk={kpath_ldmk}"
|
||||
|
||||
left = np.min(kpt[:,0]); right = np.max(kpt[:,0])
|
||||
top = np.min(kpt[:,1]); bottom = np.max(kpt[:,1])
|
||||
kmean_bbox.append([left, right, top, bottom])
|
||||
|
||||
|
||||
if len(vpath_ldmks) > 0:
|
||||
kmean_bbox = np.array(kmean_bbox)
|
||||
# kmean_bbox = kmean_bbox.max(axis=0)
|
||||
@@ -83,6 +82,7 @@ if __name__ == "__main__":
|
||||
mean_bbox.append([left, right, top, bottom])
|
||||
logger.info(f"\t max bbox ={[left, right, top, bottom]}")
|
||||
|
||||
|
||||
# get toatl mean bbox
|
||||
mean_bbox = np.array(mean_bbox)
|
||||
# mean_bbox = mean_bbox.max(axis=0).astype(np.int32)
|
||||
|
||||
@@ -8,6 +8,7 @@ import os, sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from common.logger import Logger
|
||||
|
||||
|
||||
def bbox2point(left, right, top, bottom, type='bbox'):
|
||||
''' bbox from detector and landmarks are different
|
||||
'''
|
||||
@@ -32,6 +33,7 @@ def processing_one_folder(ipath_frame, ipath_ldmks, ipath_fcrop, ipath_tfrom, ip
|
||||
vpath_image = sorted(ipath_frame.glob(f"*.{suffix}"), key=lambda x: int(x.stem.split("-")[-1]), reverse=False)
|
||||
logger.info(f'--> total have {len(vpath_image)} images, top: \n{vpath_image[:3]}')
|
||||
|
||||
|
||||
# set prev_ldmk
|
||||
prev_ldmk = None
|
||||
|
||||
@@ -43,11 +45,10 @@ def processing_one_folder(ipath_frame, ipath_ldmks, ipath_fcrop, ipath_tfrom, ip
|
||||
for j, jpath_frame in enumerate(vpath_image):
|
||||
image_name = jpath_frame.stem # (frame-0000)
|
||||
|
||||
if j%100 == 0:
|
||||
if j%200 == 0:
|
||||
logger.info(f"load jpath_frame --> {jpath_frame}")
|
||||
|
||||
# if j < 19300: continu
|
||||
|
||||
ipath_ldmk = ipath_ldmks.joinpath(image_name + ".txt")
|
||||
if not ipath_ldmk.exists():
|
||||
raise Exception(f"ipath_ldmk not exists --> {ipath_ldmk}")
|
||||
@@ -88,11 +89,6 @@ def processing_one_folder(ipath_frame, ipath_ldmks, ipath_fcrop, ipath_tfrom, ip
|
||||
# record prev
|
||||
prev_ldmk = kpt.copy().reshape(-1) # record prev_ldmk
|
||||
|
||||
# reverse H&W
|
||||
if roation_image:
|
||||
image = image.transpose(1,0,2) # (H, W, 3)
|
||||
kpt = kpt[:, ::-1] # (68, 2)
|
||||
|
||||
if use_same_bbox:
|
||||
left, right = same_bbox[0], same_bbox[1]
|
||||
top, bottom = same_bbox[2], same_bbox[3]
|
||||
@@ -113,41 +109,50 @@ def processing_one_folder(ipath_frame, ipath_ldmks, ipath_fcrop, ipath_tfrom, ip
|
||||
[0, crop_size - 1], # (left-botton corner)
|
||||
[crop_size - 1, 0]]) # (right-top corner)
|
||||
|
||||
# logger.info(f"estimate_transform - 3")
|
||||
# tform_params dytpe = float64, shape = (3, 3)
|
||||
tform = estimate_transform('similarity', src_pts, DST_PTS)
|
||||
|
||||
# image = image/255.
|
||||
# (crop_size, crop_size, 3) ,float64
|
||||
cropped_imag = warp(image, tform.inverse, output_shape=(crop_size, crop_size)) # scale to (0~1)
|
||||
# logger.info(f"estimate_transform - 3 - 2")
|
||||
|
||||
## use skimage (crop_size, crop_size, 3) ,float64, 0~1
|
||||
# cropped_imag = warp(image, tform.inverse, output_shape=(crop_size, crop_size)) # scale to (0~1)
|
||||
# cropped_imag = (255*cropped_imag).astype(np.uint8)
|
||||
|
||||
## use cv2.warpAffine
|
||||
# (crop_size, crop_size, 3) ,uint8, 0~255
|
||||
cropped_imag = cv2.warpAffine(image, tform.params[:2,:], (crop_size, crop_size), flags=cv2.INTER_LANCZOS4) # (dtype=uint, 0~255)
|
||||
cv2.imwrite(str(kpath_fcrop), cropped_imag)
|
||||
|
||||
|
||||
# logger.info(f"estimate_transform - 3 - 3")
|
||||
cropped_ldmk = np.dot(tform.params, np.hstack([kpt, np.ones([kpt.shape[0],1])]).T).T # (68,3)
|
||||
cropped_ldmk = cropped_ldmk[:, :2]
|
||||
|
||||
# logger.info(f"image dytpe = {image.dtype}, shape = {image.shape} ")
|
||||
# logger.info(f"cropped_imag dytpe = {cropped_imag.dtype}, shape = {cropped_imag.shape} ")
|
||||
# logger.info(f"tform_params dytpe = {tform.params.dtype}, shape = {tform.params.shape} ")
|
||||
# logger.info(f"cropped_ldmk dytpe = {cropped_ldmk.dtype}, shape = {cropped_ldmk.shape}, max={cropped_ldmk.max()}, min={cropped_ldmk.min()} ")
|
||||
|
||||
|
||||
# logger.info(f"save np - 4")
|
||||
np.save(kpath_tfrom, tform.params)
|
||||
np.savetxt(kpath_lcrop, cropped_ldmk, fmt=" %3d")
|
||||
|
||||
cropped_imag = (255*cropped_imag).astype(np.uint8)
|
||||
cv2.imwrite(str(kpath_fcrop), cropped_imag)
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
actor = "Actor6"
|
||||
sub_folder = "processing2" # smile, processing, processing2
|
||||
actor = "Actor7"
|
||||
sub_folder = "processing" # smile, processing, processing2
|
||||
|
||||
# logger
|
||||
logger = Logger(f"./data/{actor}", postfix=f"crop-transform-{sub_folder}")
|
||||
|
||||
path_data = Path(f"/ssdata1/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_same_bbox = f"data/{actor}/max_bbox_{sub_folder}.npy"
|
||||
|
||||
#
|
||||
vpath_videos = sorted(path_data.glob("*"), reverse=False)
|
||||
vpath_videos = sorted(path_data.glob("*"), reverse=True)
|
||||
logger.info(f"Have {len(vpath_videos)} dir files")
|
||||
|
||||
# whole body need roation frame
|
||||
@@ -155,11 +160,11 @@ if __name__ == "__main__":
|
||||
logger.info(f"roation_image = {roation_image}")
|
||||
|
||||
# for each word
|
||||
for i, ipath_item in enumerate(vpath_videos):
|
||||
for i, ipath_item in enumerate(vpath_videos[10:]):
|
||||
iname = ipath_item.stem
|
||||
logger.info(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
|
||||
if iname not in ["4R3A0139"]: continue
|
||||
# if iname not in ["4R3A0139"]: continue
|
||||
|
||||
# if iname not in IDs: continue
|
||||
ipath_ldmks = ipath_item.joinpath("landmarks_FAN")
|
||||
@@ -174,11 +179,17 @@ if __name__ == "__main__":
|
||||
|
||||
num_frame = len(list(ipath_frame.glob("*.jpg")))
|
||||
|
||||
|
||||
# check frame have exsit
|
||||
if num_frame < 50:
|
||||
logger.info(f"\n Skip: num_frame = {num_frame} is small!")
|
||||
continue
|
||||
|
||||
# check have done
|
||||
# num_fcrop = len(list(ipath_fcrop.glob("*.jpg")))
|
||||
# if num_frame == num_fcrop:
|
||||
# logger.info(f"\n Skip: have already done!")
|
||||
# continue
|
||||
num_fcrop = len(list(ipath_fcrop.glob("*.jpg")))
|
||||
if num_frame == num_fcrop:
|
||||
logger.info(f"\n Skip: have already done!")
|
||||
continue
|
||||
|
||||
# check landmarks have exists
|
||||
num_ldmks = len(list(ipath_ldmks.glob("*.txt")))
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import librosa
|
||||
import numpy as np
|
||||
from pathlib import Path
|
||||
|
||||
import os, sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from common.logger import Logger
|
||||
|
||||
|
||||
def load_mask(j, path_parse):
|
||||
|
||||
parsing_anno = np.load(path_parse) # (512, 512)
|
||||
mask = np.zeros_like(parsing_anno).astype(np.uint8) # (512, 512)
|
||||
|
||||
|
||||
|
||||
atts = ['skin', 'l_brow', 'r_brow', 'l_eye', 'r_eye', 'eye_g', 'l_ear', 'r_ear', 'ear_r',
|
||||
'nose', 'mouth', 'u_lip', 'l_lip', 'neck', 'neck_l', 'cloth', 'hair', 'hat']
|
||||
|
||||
# atts_selected = ['skin', 'l_brow', 'r_brow', 'nose', 'u_lip', 'l_lip']
|
||||
# atts_selected = ['skin', 'l_brow', 'r_brow', 'l_eye', 'r_eye', 'eye_g', 'l_ear', 'r_ear', 'ear_r',
|
||||
# 'nose', 'mouth', 'u_lip', 'l_lip', ]
|
||||
atts_selected = ['skin', 'l_brow', 'r_brow', 'l_eye', 'r_eye', 'eye_g', 'nose', 'mouth', 'u_lip', 'l_lip']
|
||||
|
||||
class_contains = np.unique(parsing_anno)
|
||||
|
||||
if j % 1000 == 0:
|
||||
logger.info(f"\t the {j:06d}-th frame, class_contains = {class_contains}")
|
||||
|
||||
for iclass, iatt in enumerate(atts, 1):
|
||||
if (iatt in atts_selected) and (iclass in class_contains):
|
||||
index = np.where(parsing_anno == iclass)
|
||||
mask[index[0], index[1]] = 1
|
||||
|
||||
return mask
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
actor = "Actor6"
|
||||
sub_folder = "processing2" # smile, processing, processing2
|
||||
|
||||
# logger
|
||||
logger = Logger(f"./data/{actor}", postfix=f"generate-mask-{sub_folder}")
|
||||
|
||||
|
||||
path_data = Path(f"/ssdata1/lsen/DATA/{actor}/{sub_folder}")
|
||||
v_dir_videos = sorted(path_data.glob("*"), reverse=False)
|
||||
logger.info(f"Have {len(v_dir_videos)} dir files")
|
||||
|
||||
# for each video
|
||||
duration_frame, duration_parse = 0, 0
|
||||
for ipath_data in v_dir_videos:
|
||||
ivideo_name = ipath_data.stem
|
||||
|
||||
logger.info(f"\n processing {ivideo_name} ... ")
|
||||
ipath_infors = ipath_data.joinpath("video/info.json")
|
||||
ipath_frame = ipath_data.joinpath("frames")
|
||||
ipath_parse = ipath_data.joinpath("frames_crop_parse_512")
|
||||
ipath_parse_skin = ipath_data.joinpath("frames_crop_parse_skin_512")
|
||||
ipath_parse_skin.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# if ipath_save_parse.exists():
|
||||
# logger.info(f"ipath_save_exp have already save > {ipath_save_parse}")
|
||||
# continue
|
||||
|
||||
if not ipath_infors.exists():
|
||||
continue
|
||||
|
||||
# load video info
|
||||
with open(str(ipath_infors), "r") as f:
|
||||
info = json.load(f)
|
||||
fps = info["fps"]
|
||||
nframes = info["nframes"]
|
||||
logger.info(f"info = {info}, duration ={nframes / fps / 60}")
|
||||
|
||||
# check equal
|
||||
vframe_frame = list(ipath_frame.glob("*.jpg"))
|
||||
vframe_parse = list(ipath_parse.glob("*.npy"))
|
||||
logger.info(f"vframe_frame len = {len(vframe_frame)}, vframe_parse={len(vframe_parse)}")
|
||||
|
||||
duration_frame += len(vframe_frame) / 50 / 60
|
||||
duration_parse += len(vframe_parse) / 50 / 60
|
||||
logger.info(f"add duration_frame = {duration_frame} min, duration_parse={duration_parse} min")
|
||||
|
||||
if len(vframe_frame) != nframes:
|
||||
logger.info(f"\n ERROR: nframe_real ={len(vframe_frame)} / nframe_info ={nframes}")
|
||||
continue
|
||||
|
||||
# check have done
|
||||
# vframe_parse = list(ipath_parse_skin.glob("*.npy"))
|
||||
# if len(vframe_parse) == nframes:
|
||||
# logger.info(f"ipath_parse_skin have already done!")
|
||||
# continue
|
||||
|
||||
# feat_parse = []
|
||||
for j in range(len(vframe_frame)):
|
||||
jpath_parse = ipath_parse.joinpath(f"frame-{j:06d}.npy")
|
||||
jpath_parse_save = ipath_parse_skin.joinpath(f"frame-{j:06d}.npy")
|
||||
|
||||
if not jpath_parse.exists():
|
||||
logger.info(f"\n ERROR: Path NOT FOUND! -> {jpath_parse}")
|
||||
break
|
||||
|
||||
data_mask = load_mask(j, jpath_parse) # (512, 512)
|
||||
np.save(jpath_parse_save, data_mask)
|
||||
|
||||
# feat_parse.append(data_mask)
|
||||
@@ -17,21 +17,21 @@ from decalib.utils.config import cfg as deca_cfg
|
||||
def main(args):
|
||||
|
||||
# device = args.device
|
||||
device = "cuda:9"
|
||||
device = "cuda:0"
|
||||
# run DECA
|
||||
deca_cfg.model.use_tex = args.useTex
|
||||
deca = DECA(config = deca_cfg, device=device)
|
||||
|
||||
# path_data = Path("/yrfs/lsen/DATA/TestData/processing")
|
||||
path_data = Path("/ssdata1/lsen/DATA/Actor6/processing2")
|
||||
|
||||
v_dir_videos = sorted(path_data.glob("*"), reverse=True)
|
||||
print(f"Have {len(v_dir_videos)} dir files")
|
||||
# path_data = Path("/ssdata1/lsen/DATA/Actor6/processing2")
|
||||
path_data = Path("/mfs/lsen/DATA/Actor7/processing")
|
||||
|
||||
v_dir_videos = sorted(path_data.glob("*"), reverse=False)
|
||||
print(f"Have {len(v_dir_videos)} dir files")
|
||||
|
||||
# IDs = ["actor-2HD", "actor-3HD"]
|
||||
# IDs = ["clip_full"]
|
||||
|
||||
|
||||
# for each video
|
||||
for i, ipath_data in enumerate(v_dir_videos):
|
||||
ivideo_name = ipath_data.stem
|
||||
|
||||
@@ -13,14 +13,14 @@ from common.logger import Logger
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
||||
actor = "Actor6"
|
||||
sub_folder = "processing2" # smile, processing, processing2
|
||||
actor = "Actor7"
|
||||
sub_folder = "processing" # smile, processing, processing2
|
||||
|
||||
# logger
|
||||
logger = Logger(f"./data/{actor}", postfix=f"feature-3dmm-{sub_folder}")
|
||||
|
||||
# path data
|
||||
path_data = Path(f"/ssdata1/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
v_dir_videos = sorted(path_data.glob("*"), reverse=False)
|
||||
logger.info(f"Have {len(v_dir_videos)} dir files")
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@ from common.logger import Logger
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
actor = "Actor6"
|
||||
sub_folder = "processing2" # smile, processing, processing2
|
||||
actor = "Actor7"
|
||||
sub_folder = "processing" # smile, processing, processing2
|
||||
|
||||
# logger
|
||||
logger = Logger(f"./data/{actor}", postfix=f"concat-coeff-{sub_folder}")
|
||||
|
||||
|
||||
path_data = Path(f"/ssdata1/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
v_dir_videos = sorted(path_data.glob("*"), reverse=False)
|
||||
print(f"Have {len(v_dir_videos)} dir files")
|
||||
|
||||
|
||||
@@ -10,16 +10,16 @@ if __name__ == "__main__":
|
||||
|
||||
# fid = "Bringing-Our-Workplace-Policies-into-the-21st-Century"
|
||||
# fid = "4R3A0071"
|
||||
actor= "Actor6"
|
||||
sub_folder = "processing2" # processing, smile, body
|
||||
fid = '4R3A0140'
|
||||
actor= "Actor7"
|
||||
sub_folder = "processing" # processing, smile, body
|
||||
fid = '4R3A0178'
|
||||
|
||||
|
||||
# logger
|
||||
logger = Logger(f"./data/{actor}", postfix=f"mean-coeff-{sub_folder}")
|
||||
|
||||
# data
|
||||
path_data = Path(f"/ssdata1/lsen/DATA/{actor}/{sub_folder}/{fid}")
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}/{fid}")
|
||||
path_save = Path(f"./data/{actor}/mean_deca_coeff_{actor}_{sub_folder}.npy")
|
||||
path_save.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ from common.logger import Logger
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
actor= "Actor6"
|
||||
sub_folder = "processing2" # processing, smile, body
|
||||
actor= "Actor7"
|
||||
sub_folder = "processing" # processing, smile, body
|
||||
|
||||
path_data = Path(f"/ssdata1/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_save = Path(f'data/{actor}/{actor}-raw-{sub_folder}-1h')
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_save = Path(f'data/{actor}/{actor}-raw-{sub_folder}-2h')
|
||||
path_save.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# set logging
|
||||
@@ -30,18 +30,15 @@ if __name__ == "__main__":
|
||||
# logger.info(f"vids total= {vids}")
|
||||
|
||||
# training set
|
||||
if sub_folder == "processing2":
|
||||
vid_test = set(["4R3A0139", "4R3A0140"])
|
||||
vid_valid = set(["4R3A0139", "4R3A0140"])
|
||||
if sub_folder == "processing":
|
||||
vid_test = set(["4R3A0178", "4R3A0179"])
|
||||
vid_valid = set(["4R3A0178", "4R3A0179"])
|
||||
vid_train = vids - vid_test - vid_valid
|
||||
logger.info(f"vid test= {vid_test} \nvalid= {vid_valid}")
|
||||
logger.info(f"vid train= {vid_train}")
|
||||
else:
|
||||
vid_test = set(["4R3A0110", "4R3A0112", "4R3A0113"])
|
||||
vid_valid = set(["4R3A0110", "4R3A0112", "4R3A0113"])
|
||||
vid_train = vids - vid_test - vid_valid
|
||||
logger.info(f"vid test= {vid_test} \nvalid= {vid_valid}")
|
||||
logger.info(f"vid train= {vid_train}")
|
||||
pass
|
||||
|
||||
|
||||
|
||||
# for each video
|
||||
|
||||
@@ -12,10 +12,10 @@ from common.logger import Logger
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
actor= "Actor6"
|
||||
sub_folder = "processing2" # processing, smile, body
|
||||
actor= "Actor7"
|
||||
sub_folder = "processing" # processing, smile, body
|
||||
|
||||
path_data = Path(f"/ssdata1/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_data = Path(f"/mfs/lsen/DATA/{actor}/{sub_folder}")
|
||||
path_save = Path(f'data/{actor}/data-render-{sub_folder}-2h')
|
||||
path_save.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
@@ -35,18 +35,14 @@ if __name__ == "__main__":
|
||||
# vid_train = vids - vid_test - vid_valid
|
||||
|
||||
# actor5 smile
|
||||
if sub_folder == "processing2":
|
||||
vid_test = set(["4R3A0139", "4R3A0140"])
|
||||
vid_valid = set(["4R3A0139", "4R3A0140"])
|
||||
if sub_folder == "processing":
|
||||
vid_test = set(["4R3A0178", "4R3A0179"])
|
||||
vid_valid = set(["4R3A0178", "4R3A0179"])
|
||||
vid_train = vids - vid_test - vid_valid
|
||||
logger.info(f"vid test= {vid_test} \nvalid= {vid_valid}")
|
||||
logger.info(f"vid train= {vid_train}")
|
||||
else:
|
||||
vid_test = set(["4R3A0110", "4R3A0112", "4R3A0113"])
|
||||
vid_valid = set(["4R3A0110", "4R3A0112", "4R3A0113"])
|
||||
vid_train = vids - vid_test - vid_valid
|
||||
logger.info(f"vid test= {vid_test} \nvalid= {vid_valid}")
|
||||
logger.info(f"vid train= {vid_train}")
|
||||
pass
|
||||
|
||||
|
||||
# for each video
|
||||
@@ -106,19 +102,20 @@ if __name__ == "__main__":
|
||||
data_coeff = data_coeff.astype(np.float16) # convert float16
|
||||
|
||||
# load landmark
|
||||
feat_ldmk = []
|
||||
feat_ldmk = np.zeros([num_ldmks, 68, 2]) # (N, 68, 2)
|
||||
for k in range(num_ldmks):
|
||||
kpath_ldmk = ipath_ldmks.joinpath(f"frame-{k:06d}.txt")
|
||||
if not kpath_ldmk.exists():
|
||||
logger.info(f"\n ERROR: landmark path NOT FOUND! -> {kpath_ldmk}")
|
||||
break
|
||||
|
||||
kpt = np.loadtxt(kpath_ldmk) # (68, 2)
|
||||
assert kpt.shape[0] == 68, f"the kpt shape ={kpt.shape}, --> {kpath_ldmk}"
|
||||
feat_ldmk.append(kpt)
|
||||
feat_ldmk[k] = np.loadtxt(kpath_ldmk) # (68, 2)
|
||||
# assert kpt.shape[0] == 68, f"the kpt shape ={kpt.shape}, --> {kpath_ldmk}"
|
||||
# feat_ldmk[k] = kpt[:]
|
||||
# feat_ldmk.append(kpt)
|
||||
|
||||
# smooth landmark it
|
||||
feat_ldmk = np.array(feat_ldmk) # (N, 68, 2)
|
||||
# feat_ldmk = np.array(feat_ldmk) # (N, 68, 2)
|
||||
feat_ldmk = savgol_filter(feat_ldmk, window_length=5, polyorder=3, axis=0, mode='nearest')
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user