Skip to content

Instantly share code, notes, and snippets.

View BeBeBerr's full-sized avatar
🎯
Focusing

Luyuan Wang BeBeBerr

🎯
Focusing
View GitHub Profile
@BeBeBerr
BeBeBerr / bundle_adjustment.cc
Created November 29, 2021 03:15
Simple Bundle Adjustment using Ceres
#include <cmath>
#include <cstdio>
#include <iostream>
#include "ceres/ceres.h"
#include "ceres/rotation.h"
// Read a Bundle Adjustment in the Large dataset.
class BALProblem
{
public:
~BALProblem()
@BeBeBerr
BeBeBerr / CMakeLists.txt
Created November 22, 2021 04:32
Curve fitting using g2o and Ceres
# cmake version to be used
cmake_minimum_required( VERSION 3.0 )
# message("system: ${CMAKE_LIBRARY_PATH}")
# project name
project(helloworld)
# target
@BeBeBerr
BeBeBerr / grad-cam.py
Last active June 12, 2021 09:41
Grad-CAM with MobileNet v2
import torch
import numpy as np
from torchvision import datasets, transforms, models
from PIL import Image
import torch.nn.functional as F
import matplotlib.pyplot as plt
import cv2
class GradCAM():
def __init__(self, model, layer_index=-6):