help='RGB image directory') args = parser.parse_args() print(args) strideNet = 8 Transform = outil.Homography nbPoint = 4 torch.manual_seed(1000) np.random.seed(1000) ## Loading model # Define Networks network = { 'netFeatCoarse': model.FeatureExtractor(), 'netCorr': model.CorrNeigh(args.kernelSize), 'netFlowCoarse': model.NetFlowCoarse(args.kernelSize), 'netMatch': model.NetMatchability(args.kernelSize), } for key in list(network.keys()): network[key].cuda() typeData = torch.cuda.FloatTensor # loading Network if args.resumePth: param = torch.load(args.resumePth) msg = 'Loading pretrained model from {}'.format(args.resumePth) print(msg) for key in list(param.keys()):
import cv2 from matplotlib import pyplot as plt import trimesh from getResults import opencv_decompose, _getFlow, matches_from_flow from run_point_cloud import compute_and_save sys.path.append('../') Transform = outil.Homography nbPoint = 4 ## Loading model # Define Networks network = { 'netFeatCoarse': model.FeatureExtractor(), 'netCorr': model.CorrNeigh(kernelSize), 'netFlowCoarse': model.NetFlowCoarse(kernelSize), 'netMatch': model.NetMatchability(kernelSize), } if use_cuda: device = torch.device("cuda") for key in list(network.keys()): network[key].cuda() else: device = torch.device("cpu") # loading Network param = torch.load(resumePth) msg = 'Loading pretrained model from {}'.format(resumePth)