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 traceback | |
import time | |
def with_telegram(orig_fn): | |
start = time.time() | |
try: | |
import telegram_send | |
def push_msg_fn(msg): |
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 | |
from vis_utils import cv2_hatch | |
def show_flow(flow, src_img, dst_img, grid_sz=10, | |
occl=None, occl_thr=255, | |
arrow_color=(0, 0, 255), | |
point_color=(0, 255, 255), | |
occlusion_color=(217, 116, 0), | |
decimal_places=2): |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import os | |
import sys | |
import argparse | |
import tqdm | |
import tensorflow as tf |
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
// compute intersection area | |
std::vector<cv::Point2f> intersections_unsorted; | |
std::vector<cv::Point2f> intersections; | |
cv::rotatedRectangleIntersection(bounding_rect, detection_bbox, intersections_unsorted); | |
if (intersections_unsorted.size() < 3) { | |
return GT_score{}; | |
} | |
// need to sort the vertices CW or CCW | |
cv::convexHull(intersections_unsorted, intersections); |