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
# Follow installation from here: https://www.reddit.com/r/LocalLLaMA/comments/11o6o3f/how_to_install_llama_8bit_and_4bit/ | |
import torch | |
import torch.nn as nn | |
import sys | |
sys.path.append('repositories/GPTQ-for-LLaMa') | |
import time | |
from quant import make_quant | |
is_triton = False | |
import inspect |
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
# CMAKE FILE to separatly compile cuda and c++ files | |
# with the c++11 standard | |
# | |
# | |
# Folder structure: | |
# | |
# | | |
# +--main.cpp (with C++11 content) | |
# +--include/ | |
# | | |
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
function writeFlowFile(img, filename) | |
% writeFlowFile writes a 2-band image IMG into flow file FILENAME | |
% According to the c++ source code of Daniel Scharstein | |
% Contact: schar@middlebury.edu | |
% Author: Deqing Sun, Department of Computer Science, Brown University | |
% Contact: dqsun@cs.brown.edu | |
% $Date: 2007-10-31 15:36:40 (Wed, 31 Oct 2006) $ |
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
%% Generate vector field from fisheye stereo from faro | |
close all | |
clear all | |
% Change this file (calibFile) | |
calibFile = fopen('im203.xml'); | |
calibrationFilename = 'calibrationField.flo'; | |
translationFilename = 'trajectoryField.flo'; |
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
function img = readFlowFile(filename) | |
% readFlowFile read a flow file FILENAME into 2-band image IMG | |
% According to the c++ source code of Daniel Scharstein | |
% Contact: schar@middlebury.edu | |
% Author: Deqing Sun, Department of Computer Science, Brown University | |
% Contact: dqsun@cs.brown.edu | |
% $Date: 2007-10-31 16:45:40 (Wed, 31 Oct 2006) $ |
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
% Convert correspondence to depth (3d) - for equidistant model dataset | |
close all | |
clear all | |
% Change these two files (f and calibFile) | |
f = readFlowFile('im203.flo'); | |
calibFile = fopen('im203.xml'); | |
u = f(:,:,1); | |
v = f(:,:,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
%% Generate vector field from fisheye stereo | |
close all | |
clear all | |
translationVectorFilename = 'translationVectorNewton.flo'; | |
calibrationVectorFilename = 'calibrationVectorNewton.flo'; | |
% Calibration data from T265 | |
K0 = [285.722 0 420.135; 0 286.759 403.394; 0 0 1]; | |
D0 = [-0.00659769 0.0473251 -0.0458264 0.00897725 0]; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
using UnityEngine.XR.WSA; | |
using UnityEngine.XR.WSA.Sharing; | |
using System; | |
using System.Runtime.InteropServices.WindowsRuntime; | |
#if !UNITY_EDITOR |