Skip to content

Instantly share code, notes, and snippets.

@handong1587
handong1587 / process_ilsvrc_det_200_labalmap.sh
Created August 13, 2016 08:44
Convert original labelmap_file to a formated text file
# Convert original labelmap_file to a formated text file
# https://github.com/weiliu89/caffe/blob/ssd/data/ILSVRC2016/labelmap_ilsvrc_det.prototxt
# Result file:
# none_of_the_above 0 background
# n02672831 1 accordion
# n02691156 2 airplane
# ...
cat labelmap_ilsvrc_det.prototxt | grep ':' > det_200_labelmap.txt
@echo off
set base_dir=d:\path\to\folder
set sub_dir[0]=sub_folder1
set sub_dir[1]=sub_folder2
set sub_dir[2]=sub_folder3
for /F "tokens=2 delims==" %%s in ('set sub_dir[') do (
for %%A in ("%base_dir%\%%s\*") do (
p4 add "%%A"
)
## step 4
export NDKROOT=D:/Software/AndroidDev/android-ndk-r10e
export SDKROOT=D:/Software/AndroidDev/android-sdk-windows/platform-tools
## step 5
export HWKIND=generic
## 32bit
export TOOLCHAIN=$NDKROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/windows/bin/arm-linux-androideabi
export AR=$TOOLCHAIN-ar.exe
cd /path/to/ncftp/ncftp-3.2.5/bin
local_dir=/path/to/local
pwd
for folder in `ls $local_dir`
do
echo "$local_dir/$folder"
./ncftpput -R -v -u yourusername -p yourpassword yourftpsite path/to/remote/ $local_dir/$folder
# sleep 5 seconds to avoid disconnect timeout
@handong1587
handong1587 / blur_detector
Created April 6, 2016 03:14 — forked from pceres/blur_detector
blurry photos detection
#! /bin/bash
#
# Author: Pasquale Ceres (pasquale_c@hotmail.com)
# License: GPL ver. 3
#
# Script originally developed for the
# "San Lorenzo Martire Caposele Church Records Digitalization Project"
#
# http://www.facebook.com/group.php?gid=188973755117&v=photos