Skip to content

Instantly share code, notes, and snippets.

View zhangluustb's full-sized avatar
🎯
Focusing

zhanglu zhangluustb

🎯
Focusing
View GitHub Profile
@zhangluustb
zhangluustb / get_so.sh
Created March 16, 2020 09:32
ensorflow不同版本的so可以使用下面sh脚本下载:
TF_TYPE="cpu" # Change to "gpu" for GPU support
OS="linux" # Change to "darwin" for Mac OS
TARGET_DIRECTORY="/usr/local"
curl -L \
"https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-${TF_TYPE}-${OS}-x86_64-1.4.1.tar.gz" |
sudo tar -C $TARGET_DIRECTORY -xz
@zhangluustb
zhangluustb / generate_img_from_backgroudandfront.ipynb
Created March 10, 2020 11:33
generate_img_from_backgroudandfront.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zhangluustb
zhangluustb / angle.cpp
Created March 10, 2020 02:15
求四边形四个角角度
double angle(Point pt1, Point pt2, Point pt0) {
//p0为公共点
double dx1 = pt1.x - pt0.x;
double dy1 = pt1.y - pt0.y;
double dx2 = pt2.x - pt0.x;
double dy2 = pt2.y - pt0.y;
double angle_line = (dx1 * dx2 + dy1 * dy2) / sqrt((dx1 * dx1 + dy1 * dy1) * (dx2 * dx2 + dy2 * dy2) + 1e-10);
return acos(angle_line) * 180 / 3.141592653;
}
@zhangluustb
zhangluustb / image_to_numpy.py
Created October 15, 2019 02:04
为什么我的 CV 模型不好用?没想到原因竟如此简单
import PIL.Image
import PIL.ImageOps
import numpy as np
def exif_transpose(img):
if not img:
return img
exif_orientation_tag = 274
@zhangluustb
zhangluustb / transform_to_disk.ipynb
Created March 21, 2019 03:56
transform_to_disk fastai
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.