示例#1
0
import numpy as np
import scipy.io as scio
import sys
import os
import argparse
import pickle
from sklearn import metrics
import json
from utils.util import score_smoothing
from utils.paths import PATHS

sys.path.append('../')

DATA_DIR = PATHS.get_dataset_dir_path()

# normalize scores in each sub video
NORMALIZE = True

# number of history frames, since in prediction based method,
# the first 4 frames can not be predicted, so that
# the first 4frames are undecidable, we just ignore the first 4 frames
DECIDABLE_IDX = 2


def parser_args():
    parser = argparse.ArgumentParser(
        description='evaluating the model, computing the roc/auc.')

    parser.add_argument('-f',
                        '--file',
                        type=str,
示例#2
0
from sklearn.externals import joblib
import sys
from scripts import inference
from models.CAE import CAE_encoder
from utils import util
import os
import argparse
import numpy as np
import pickle
import time
from utils import evaluate
from utils.paths import PATHS

sys.path.append("../")

prefix = PATHS.get_dataset_dir_path()


def arg_parse():
    parser = argparse.ArgumentParser()
    parser.add_argument("-g",
                        "--gpu",
                        type=str,
                        default="0",
                        help="Use which gpu?")
    parser.add_argument("-d",
                        "--dataset",
                        type=str,
                        help="Train on which dataset")
    parser.add_argument("-b",
                        "--bn",