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 numpy as np | |
import time | |
from scipy.sparse.linalg import cg | |
import matplotlib.pyplot as plt | |
from matplotlib.pyplot import cm | |
def f(x, A, b, c): | |
return 0.5 * np.dot(x.T, np.dot(A, x)) - np.dot(b.T, x) + c |
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 copy | |
import cv2 | |
import torch.nn.functional as F | |
import os.path as osp | |
import glob | |
import numpy as np | |
import torch | |
from mmdet.apis import init_detector, inference_detector | |
from mmcv.parallel import collate, scatter | |
from mmcv.ops.nms import batched_nms |