First of all install update and upgrade your system:
$ sudo apt update
$ sudo apt upgrade
Then, install required libraries:
#!/usr/bin/env python | |
# gpu_stat.py [DELAY [COUNT]] | |
# dump some gpu stats as a line of json | |
# {"util":{"PCIe":"0", "memory":"11", "video":"0", "graphics":"13"}, "used_mem":"161"} | |
import json, socket, subprocess, sys, time | |
try: | |
delay = int(sys.argv[1]) | |
except: | |
delay = 1 |
import os, glob, collections, datetime, subprocess | |
from dateutil.relativedelta import relativedelta | |
# Para un futuro uso es recomendable usar argparse o un fichero de configuración | |
analyzed_dir = '/media/ugiat/dd1/rtve/signantes/analyzed/' | |
timecodes_dir = '/media/ugiat/Drive/Signantes_Database/TCs/' | |
output_dir = '/media/ugiat/Drive/Signantes_Database/Output/' | |
# Diccionario de Delays - dateList yyyymmdd | |
# Se considera que todas las semanas incluyen como mínimo un signante para cada uno de los 7 días!!! |
import os, glob | |
folders = ('./ordered_lib/normal','./ordered_lib/rough-bmp','./ordered_lib/diffuse') | |
for folder in folders: | |
if os.path.isdir(folder) == False: | |
os.makedirs(folder) | |
folders = next(os.walk('./library'))[1] | |
normal_imgs = [] |
import argparse, datetime | |
from dateutil.relativedelta import relativedelta | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--timestamp', required=True, type=str, help='Tiempo en el que empieza la escena.') | |
parser.add_argument('--add', required=True, type=str, help='Tiempo en el que acaba la escena.') | |
args = parser.parse_args() | |
# HH:MM:SS.XXX | |
def get_datetime(input_time): |
## Refer to http://caffe.berkeleyvision.org/installation.html | |
# Contributions simplifying and improving our build system are welcome! | |
# cuDNN acceleration switch (uncomment to build with cuDNN). | |
USE_CUDNN := 1 | |
# CPU-only switch (uncomment to build without GPU support). | |
# CPU_ONLY := 1 | |
# uncomment to disable IO dependencies and corresponding data layers |