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
import numpy as np | |
import cv2 | |
import random | |
I = cv2.imread('image.png') | |
mask = np.load('mask.npy') | |
mask = (mask[:,:,0] > 0) # True / False binary matrix | |
visI = np.zeros_like(I) | |
def sample_prompt_pts(mask, h_resol=128, w_resol=128, max_pts=128, K = 20): |
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
#! /bin/bash | |
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) --build-arg UNAME=$USER\ | |
-t hxli . | |
#! /bin/bash | |
docker ps -aq -f status=exited | xargs docker rm | |
#! /bin/bash |
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
## put this into ~/Tensorflow/setup.sh settings are for Mac/CPU python3.5 by default, after installation, use $tf to load the env vars | |
#! /bin/bash | |
RootDir=$PWD/Tensorflow/ | |
## Modify this line to install a different version of anaconda | |
AnacondaURL="https://repo.continuum.io/archive/Anaconda3-4.2.0-MacOSX-x86_64.sh" | |
## Modify this line to install a specific version of tensorflow |
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
#! /bin/bash | |
sudo apt-get update | |
sudo apt-get install openbox tmux cmake vim git suckless-tools | |
git clone --recursive https://github.com/pppoe/Vim-Bash-Configuration | |
~/Vim-Bash-Configuration/make_symbolic_links.sh ~/Vim-Bash-Configuration/ | |
sudo apt-get remove resolvconf update-manager network-manager | |
sudo apt-get install openssh-server | |
sudo apt-get install libudev-dev libusb-1.0-0-dev | |
# ROS |
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
output_root = 'extracted'; | |
mkdir(output_root); | |
num_lms = 68; | |
lines = textread('flist', '%s'); | |
num_lines = length(lines); | |
for ff = 1:num_lines | |
fpath = lines{ff}; |
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
## http://www.vision.caltech.edu/xpburgos/ICCV13/ | |
output_dets_f = './dets-COFW-train.txt' | |
image_root = './COFW-train-'; | |
load('COFW_train.mat'); | |
imgs = IsTr; | |
bboxes = bboxesTr; | |
lms = phisTr; | |
% output_dets_f = './dets-COFW-test.txt' |
This file has been truncated, but you can view the full file.
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
113.265 | |
113.308 | |
113.436 | |
113.515 | |
113.68 | |
113.75 | |
113.871 | |
113.894 | |
114.026 | |
114.051 |
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
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | |
# Mac OS X specific code | |
SET(OperatingSystem "Mac OS X") | |
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") | |
SET(OperatingSystem "Linux") | |
ELSE() | |
SET(OperatingSystem "Others") | |
ENDIF() |
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 [withincovar, betweencovar] = discriminativecov(X, ids) | |
arr_ids = int16(ids); | |
dim = size(X, 2); | |
num_pts = size(X, 1); | |
num_class = size(unique(arr_ids), 1); | |
arr_ids_sets = cell(num_class,1); | |
arr_ids_count = zeros(num_class,1); | |
for i = 1:num_class |
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
#include <iostream> | |
#include <cstdio> | |
using namespace std; | |
int main() | |
{ | |
/* Binary IO*/ | |
/* |
NewerOlder