This file contains 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 numpy as np | |
import cv2 | |
cap = cv2.VideoCapture(0) # for IPCamera format : rtsp://admin:[email protected]:554/1 | |
# Define the codec and create VideoWriter object | |
fourcc = cv2.VideoWriter_fourcc(*'mp4v') | |
out = cv2.VideoWriter('traffic_video_back.mp4',fourcc, 15.0, (1920,1080)) | |
frame_count = 0 | |
while(cap.isOpened()): |
This file contains 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
#!/usr/bin/env python3 | |
# Copyright 2019 NVIDIA Corporation | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains 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 numpy as np | |
import cv2 | |
import time | |
from os.path import splitext | |
from src.label import Label | |
from src.utils import getWH, nms | |
from src.projection_utils import getRectPts, find_T_matrix |
This file contains 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 numpy as np | |
from PIL import Image | |
import cv2 | |
from src.keras_utils import reconstruct | |
import pycuda.driver as cuda | |
import pycuda.autoinit # For automatic creation and cleanup of CUDA context | |
import tensorrt as trt | |
import utils |
This file contains 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
from itertools import cycle | |
from shutil import get_terminal_size | |
from threading import Thread | |
from time import sleep | |
class Loader: | |
def __init__(self, desc="Loading...", end="Done!", timeout=0.1): | |
""" | |
A loader-like context manager |
This file contains 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 logging | |
def logInfoDetils(info): | |
logging.basicConfig( | |
format='%(asctime)s -- {%(levelname)s} ==> %(message)s', level=logging.INFO) | |
logging.info(info) | |
pass |
This file contains 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
click==7.1.2 | |
gurobipy==9.1.2 | |
itsdangerous==1.1.0 | |
Jinja2==2.11.3 | |
llist==0.8 | |
MarkupSafe==1.1.1 | |
natsort==7.1.1 | |
numpy==1.19.5 | |
orderedset==2.0.3 | |
pkg-resources==0.0.0 |