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 cv2 | |
| import sys | |
| import uuid | |
| from tqdm import tqdm | |
| video_name = str(sys.argv[1]) | |
| e_rate = int(sys.argv[2]) | |
| cap = cv2.VideoCapture(video_name+'.mp4') | |
| frame_count = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) | |
| count=0 |
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 cv2 | |
| # import matplotlib.pyplot as plt | |
| from glob import glob | |
| import sys | |
| import uuid | |
| from tqdm import tqdm | |
| import os | |
| num_of_files = len([x for x in os.listdir(str(sys.argv[1])) if (x.endswith('.txt'))]) |
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 pymongo | |
| def connect_server(): #connect mongo server | |
| myclient = pymongo.MongoClient("mongodb://localhost:27017/") | |
| return myclient | |
| #######################DATABASE UTILS################################# | |
| def create_db(): | |
| mydb = myclient["mydatabase"] #create database |
OlderNewer