Beispiel #1
0
from util.db import DynamoDBUtils
import os

# Create all Classes
db = DynamoDBUtils()

#db.purge_table()

#db.display_items()

#db.create_full_items(num_items=500, start_time=1459472400)

#db.delete_by_id('Entrance')

#db.add_classified()

#db.reset_classified()

print "\n\n\n"

cnt = 0
for row in db.get_classified_items():
    cnt += 1
print "# Classified Item Count", cnt

cnt = 0
d = {}
for row in db.get_unclassified_items():
    d[row['RASP_NAME']] = d.get(row['RASP_NAME'],0) + 1
    cnt += 1
print "# Unclassified Item Count", cnt
import pprint
import time
import shutil
import os

logger = log.getLogger(__name__)


#Path to Default Video File
VIDEO_FILE = '../resources/video.avi'

PARALLEL_PROCS = 10
OUTPUT_DIR = os.path.expanduser('~') + '/videos'

# Create all Classes
db = DynamoDBUtils()
fd = FaceDetection()


def update_record(row, report):
    # Metadata
    row['UPDATE_TIME'] = time.time()
    row['VERSION'] += 1
    row['PROCESSED'] = 1

    # Face Counts / Summary
    row['FRAME_COUNT'] = report['frame_count']
    row['FACE_COUNT'] = report['face_count']
    row['FACE_COUNT_UNIQ'] = report['face_count_uniq']

    # Face Counts / Detail
Beispiel #3
0
import multiprocessing
import pprint
import time
import shutil
import os

logger = log.getLogger(__name__)

#Path to Default Video File
VIDEO_FILE = '../resources/video.avi'

PARALLEL_PROCS = 10
OUTPUT_DIR = os.path.expanduser('~') + '/videos'

# Create all Classes
db = DynamoDBUtils()
fd = FaceDetection()


def update_record(row, report):
    # Metadata
    row['UPDATE_TIME'] = time.time()
    row['VERSION'] += 1
    row['PROCESSED'] = 1

    # Face Counts / Summary
    row['FRAME_COUNT'] = report['frame_count']
    row['FACE_COUNT'] = report['face_count']
    row['FACE_COUNT_UNIQ'] = report['face_count_uniq']

    # Face Counts / Detail
Beispiel #4
0
import glob
import time
import shutil
import os
import sys

logger = log.getLogger(__name__)

#Path to Default Video File
VIDEO_FILE = '../resources/video.avi'

PARALLEL_PROCS = 5
OUTPUT_DIR = os.path.expanduser('~') + '/videos1'

# Create all Classes
db = DynamoDBUtils()


def update_record(row, nn_categories):
    # Metadata

    row['CLASSIFICATION'] = nn_categories
    row['CLASSIFIED'] = 1

    # Update
    db.update(row)


def process_item(row):
    try:
        logger.info('Processing: <{0}> <{1}> <{2}> <{3}> <{4}>'.format(
import shutil
import os
import sys


logger = log.getLogger(__name__)


# Path to Default Video File
VIDEO_FILE = "../resources/video.avi"

PARALLEL_PROCS = 5
OUTPUT_DIR = os.path.expanduser("~") + "/videos1"

# Create all Classes
db = DynamoDBUtils()


def update_record(row, nn_categories):
    # Metadata

    row["CLASSIFICATION"] = nn_categories
    row["CLASSIFIED"] = 1

    # Update
    db.update(row)


def process_item(row):
    try:
        logger.info(