Skip to content
Snippets Groups Projects
Commit cb61d1fc authored by Ketan Kotwal's avatar Ketan Kotwal
Browse files

remove frameindexes while loading

parent 35611207
No related branches found
No related tags found
No related merge requests found
......@@ -39,8 +39,10 @@ class File(VideoPadFile):
hdf_file = h5py.File(path)
fc = FrameContainer()
for idx, frame_data in enumerate(hdf_file.keys()):
frame_keys = list(hdf_file.keys())
frame_keys.remove("FrameIndexes")
for idx, frame_data in enumerate(frame_keys):
frame = hdf_file[frame_data]["array"].value
fc.add(idx, frame, None)
......
......@@ -10,6 +10,12 @@ import os, sys
from bob.bio.video import FrameContainer
from bob.io.base import create_directories_safe, HDF5File
import numpy as np
from bob.pad.face.preprocessor.FaceCropAlign import detect_face_landmarks_in_image
import json
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
frames_per_video = 20
......@@ -51,7 +57,7 @@ class MLFPConvertor:
#------------------------------------------------------------------------------
def normalize_image(self, image, n_sigma=3.0): # or 4.0
def normalize_image(self, image, n_sigma=4.0): # 3.0 or 4.0
assert(len(image.shape)==2)
......@@ -115,7 +121,6 @@ class MLFPConvertor:
# if image is grayscale, convert to 3 channel for face detection
if len(image.shape) == 2:
print (image.shape)
image = np.repeat(image[:, :, np.newaxis], 3, axis=2)
image = np.transpose(image, (2,0,1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment