Skip to content

Instantly share code, notes, and snippets.

View xmba15's full-sized avatar
๐ŸŒ
brand new world!

Ba Tran xmba15

๐ŸŒ
brand new world!
  • Earth 616
View GitHub Profile
--find-links https://download.openmmlab.com/mmcv/dist/cu118/torch2.3/index.html
openmim==0.3.9
mmcv<2.2.0
mmsegmentation==1.2.2
ftfy
regex
@xmba15
xmba15 / lafs.py
Created March 21, 2024 16:54
kornia
@dataclass
class LAFFeatures:
lafs: torch.Tensor # 1 x num kpts x 2 x 3
resps: torch.Tensor # 1 x num kpts
descs: torch.Tensor # 1 x num kpts x 128
def __len__(self):
return self.lafs.shape[1]
@property
@xmba15
xmba15 / template_matching_fft.py
Created December 6, 2021 17:47
FFT based template matching
#!/usr/bin/env python
import argparse
import cv2
import numpy as np
def get_args():
parser = argparse.ArgumentParser("")
parser.add_argument("--image_path", type=str, required=True)