Skip to content

Instantly share code, notes, and snippets.

Joshua Z. Zhang zhreshold

Block or report user

Report or block zhreshold

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zhreshold
zhreshold / mac_backup.sh
Last active Nov 22, 2019
Clone Raspberry Pi SD Card
View mac_backup.sh
# brew install coreutils, gdd has progress option
sudo gdd if=/dev/rdisk3 of=pi4.dmg status=progress bs=4M
@zhreshold
zhreshold / README.md
Last active Sep 19, 2019
GluonCV tutorial val.rec
View README.md

val.rec for GluonCV tutorial

@zhreshold
zhreshold / cr7.jpg
Last active Aug 7, 2019
GluonCV notebooks for all hands
@zhreshold
zhreshold / cam_demo.py
Created May 8, 2019
GluonCV cam demo pose
View cam_demo.py
from __future__ import division
import argparse, time, logging, os, math, tqdm, cv2
import numpy as np
import mxnet as mx
from mxnet import gluon, nd, image
from mxnet.gluon.data.vision import transforms
import matplotlib.pyplot as plt
import matplotlib
@zhreshold
zhreshold / convert.py
Last active Mar 12, 2019
YOLOv3 converter from darknet to GluonCV
View convert.py
import numpy as np
import os, sys
import gluoncv as gcv
import mxnet as mx
shapes_ref = []
with open('ref.txt', 'r') as fid:
View READMD.md

Web data storage

@zhreshold
zhreshold / demo_ssd.py
Created Jan 14, 2019
Demo script with gluon network -> symbol -> SymbolBlock
View demo_ssd.py
"""SSD Demo script."""
import os
import argparse
import mxnet as mx
import gluoncv as gcv
from gluoncv.data.transforms import presets
from matplotlib import pyplot as plt
def parse_args():
parser = argparse.ArgumentParser(description='Test with SSD networks.')
@zhreshold
zhreshold / scanner.sh
Created Nov 15, 2018 — forked from andyrbell/scanner.sh
Make a pdf look scanned using ImageMagick
View scanner.sh
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@zhreshold
zhreshold / README.md
Created Sep 14, 2018
GluonCV C++ inference prebuilt demos
View README.md
Platform Download link
Linux(cpu, openblas)1
Linux(gpu, cuda9.0)13
Linux(gpu, cuda9.2)13
Windows x64(cpu, openblas)
Windows x64(gpu, cuda9.2)3
Mac OS(cpu, appleblas)2 x

1: use LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. gluoncv-detect in case you are using the supplied shared libraries under the same directory. You can add export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/path/to/prebuilt-package to ~/.bashrc to permanently add library into search path.

@zhreshold
zhreshold / finetune.md
Last active Aug 20, 2018
GluonCV finetune detection models
View finetune.md

How to finetune detection models in GluonCV

How to modify pre-trained network from VOC/COCO to custom classes

# python3 train_ssd.py --finetune ssd_300_vgg16_atrous_coco --dataset customxx
import gluoncv as gcv
# download pretrained from coco
net = gcv.model_zoo.get_model('ssd_300_vgg16_atrous_coco', pretrained=True)
# modify network to fit the new classes, say ['a', 'b', 'c']
You can’t perform that action at this time.