#execute server with nohup
nohup python spoof.py&>logfile.txt&
request : json format video:base64
response: json format true if video is spoof false if video is real
#execute server with nohup
nohup python spoof.py&>logfile.txt&
request : json format video:base64
response: json format true if video is spoof false if video is real
import os | |
import glob | |
import torch | |
import random | |
import numpy as np | |
from torch.utils.data import Dataset, DataLoader | |
from utils.utils import read_wav_np | |
import random as r | |
import math | |
cfg = get_cfg() | |
cfg.merge_from_file("./detectron2_repo/configs/COCO-Detection/retinanet_R_50_FPN_3x.yaml") | |
# detector threshold | |
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 | |
cfg.MODEL.WEIGHTS = 'output/model_final.pth' |
# basic libraries | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import cv2 | |
from google.colab.patches import cv2_imshow | |
# detectron2 utilities | |
import detectron2 | |
from detectron2.utils.logger import setup_logger | |
setup_logger() |
## Taken from: https://github.com/wkentaro/labelme | |
## LabelMe official repository | |
import argparse | |
import collections | |
import datetime | |
import glob | |
import json | |
import os | |
import os.path as osp |