This file contains hidden or 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 os | |
import cv2 | |
import numpy as np | |
from skimage.feature import blob_dog, blob_log, blob_doh | |
from math import sqrt | |
from time import time | |
from multiprocessing import Pool, Queue | |
def GetDiff(img0,img1,thresh_diff_pix): | |
img_diff=img0-img1 |
This file contains hidden or 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
curl -o 1234.jpg --insecure https://encrypted-tbn0.gstatic.com/images\?q\=tbn:ANd9GcRInmM91ktXEFNjponNkRx9VUp8Xx9REIIsfZoGvZlt6ohBSLP7DQ --socks5-hostname 127.0.0.1:1080 | |
bazel build -c opt --copt=-msse4.1 --copt=-msse4.2 tensorflow/contrib/lite/toco:toco | |
bazel run --config=opt --copt=-msse4.1 --copt=-msse4.2 \ | |
//tensorflow/contrib/lite/toco:toco -- \ | |
--input_file=/Users/Lavector/code/keras_to_tensorflow/mobilenet_regression.pb \ | |
--output_file=/Users/Lavector/mobilenet_regression.lite \ | |
--input_format=TENSORFLOW_GRAPHDEF \ | |
--output_format=TFLITE \ |
This file contains hidden or 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
curl -s -XPUT 'http://localhost:9200/image_search_tmp?pretty' -d '{ | |
"settings" : { | |
"analysis": { | |
"analyzer": { | |
"payload_analyzer": { | |
"type": "custom", | |
"tokenizer":"whitespace", | |
"filter":"delimited_payload_filter" | |
} | |
} |
This file contains hidden or 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
digraph G{ | |
node [shape=record] | |
a[label="ResNet50|{input:|output:}|{(224, 224, 3)|(2048)}"] | |
b[label="InceptionV3|{input:|output:}|{(299, 299, 3)|(2048)}"] | |
#c[label="Xception|{input:|output:}|{(299, 299, 3)|(2048)}"] | |
Merge[label="Merge|{input:|output:}|{(2, 2048)|(4096)}"] | |
Dropout[label="Dropout|Rate:|0.5"] | |
Output[label="Output|{input:|output:}|{(4096)|(365)}"] | |
Image -> a -> Merge | |
Image -> b -> Merge |
This file contains hidden or 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
# !/usr/bin/python | |
# coding=utf-8 | |
from PIL import Image | |
import os | |
import sys | |
def is_jpg(filename): | |
try: | |
i=Image.open(filename) | |
return i.format =='JPEG' |
This file contains hidden or 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
from theano import function, config, shared, tensor | |
import numpy | |
import time | |
vlen = 10 * 30 * 768 # 10 x #cores x # threads per core | |
iters = 1000 | |
rng = numpy.random.RandomState(22) | |
x = shared(numpy.asarray(rng.rand(vlen), config.floatX)) | |
f = function([], tensor.exp(x)) |
This file contains hidden or 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
digraph G{ | |
node [shape=record] | |
a[label="ResNet50|{input:|output:}|{(224, 224, 3)|(2048)}"] | |
b[label="InceptionV3|{input:|output:}|{(299, 299, 3)|(2048)}"] | |
#c[label="Xception|{input:|output:}|{(299, 299, 3)|(2048)}"] | |
Merge[label="Merge|{input:|output:}|{(2, 2048)|(4096)}"] | |
Dropout[label="Dropout|Rate:|0.5"] | |
Output[label="Output|{input:|output:}|{(4096)|(365)}"] | |
Image -> a -> Merge | |
Image -> b -> Merge |