Skip to content

Instantly share code, notes, and snippets.

View salilkapur's full-sized avatar

Salil Kapur salilkapur

View GitHub Profile
@salilkapur
salilkapur / mat_to_pascal.py
Created June 9, 2017 20:04
Script to convert mat annotations to PASCAL like annotations
'''
This file converts the hand dataset (https://www.robots.ox.ac.uk/~vgg/data/hands/) to Pascal Format
'''
import scipy.io as sio
from os import listdir
from os.path import isfile, join
import math
from xml.etree import ElementTree as et
import cv2
@salilkapur
salilkapur / build_script.sh
Created May 26, 2017 18:03
Build script for OpenCV
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr/share \
-D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
-D PYTHON3_EXECUTABLE=/usr/bin/python3 \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
../opencv
@salilkapur
salilkapur / resnet.diff
Created March 1, 2017 03:55
Diff for resnet model
diff --git a/slim/nets/resnet_v1.py b/slim/nets/resnet_v1.py
index 03d49ed..edc2af9 100644
--- a/slim/nets/resnet_v1.py
+++ b/slim/nets/resnet_v1.py
@@ -226,7 +226,7 @@ def resnet_v1_50(inputs,
return resnet_v1(inputs, blocks, num_classes, is_training,
global_pool=global_pool, output_stride=output_stride,
include_root_block=True, reuse=reuse, scope=scope)
-
+resnet_v1_50.default_image_size = resnet_v1.default_image_size
Opencv Output:
[[217 201 174 174]]
Coordinates of the center of the box
[304, 288, 174, 174]
SimpleCV output
[[302 288]] [175] [175]