# 'videos\\traffic-cars.mp4' video = cv2.VideoCapture('IMG_5567.mp4') # Preparing variable for writer # that we will use to write processed frames writer = None # Preparing variables for spatial dimensions of the frames h, w = None, None """ End of: Reading input video """ img_org = cv2.imread("IMG_5567.png") markers = tools.find_markers(img_org) corners, img_org = tools.sort_markers(markers, img_org) """ Start of: Loading YOLO v3 network """ # Loading COCO class labels from file # Opening file # Pay attention! If you're using Windows, yours path might looks like: # r'yolo-coco-data\coco.names' # or: # 'yolo-coco-data\\coco.names' with open('coco.names') as f: # Getting labels reading every line # and putting them into the list labels = [line.strip() for line in f]
# Import .csv of location coordinates in EPSG 3857 corners_geo = pd.read_csv('./data/corners_3857.csv') # Preparing variable for writer # that we will use to write processed frames writer = None # Preparing variables for spatial dimensions of the frames h, w = None, None """ End of: Reading input video """ img_org = cv2.imread('./playground/media/video_corners.jpg') markers = transf.find_markers(img_org) corners, img_org = transf.sort_markers(markers, img_org) """ Start of: Loading YOLO v3 network """ # Loading COCO class labels from file # Opening file # Pay attention! If you're using Windows, yours path might looks like: # r'yolo-coco-data\coco.names' # or: # 'yolo-coco-data\\coco.names' with open('./cfg/coco.names') as f: # Getting labels reading every line # and putting them into the list labels = [line.strip() for line in f]