This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
class Extraction(object): | |
""" | |
Extract the index of frames based on heart rate curve. | |
Two steps: 1. get heart rate curve 2. extract the index of frame | |
Note that the heart rate is relative value in the unit of pixel. | |
Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from utils import * | |
import argparse | |
# set a random seed to make experiments reproducible | |
np.random.seed(10) | |
# create parser | |
def create_parser(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import time | |
from utils import * | |
# set a random seed to make experiments reproducible | |
np.random.seed(10) | |
# create parser | |
def create_parser(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def posi2pdb(pdb_filename, posi_filename): | |
""" | |
The function is used to generate a valid PDB file from the coordinates. | |
Inputs: | |
pdb_filename: the output name for pdb file | |
posi_filename: the input name for file with the coordinates | |
""" | |
# load file |