Skip to content

Instantly share code, notes, and snippets.

/*
Following file take opencv mat file as an input and convert it to proper tensor object
Created by : Kumar Shubham
Date : 27-03-2016
*/
//Loading Opencv fIles for processing
//#include <opencv2/opencv.hpp>
Script started on Saturday 23 April 2016 06:26:02 PM IST
]0;ks@kyrs: ~/OpenSource/tf/shubham/deepdetect/build/testsks@kyrs:~/OpenSource/tf/shubham/deepdetect/build/tests$ exitmake
Linking CXX executable opencv_tensor
CMakeFiles/opencv_tensor.dir/opencv_tensor.cc.o: In function `ReadTensorFromImageFile(std::string, int, int, float, float, std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> >*)':
/home/ks/OpenSource/tf/shubham/deepdetect/tests/opencv_tensor.cc:46: undefined reference to `tensorflow::ops::Const(tensorflow::StringPiece, tensorflow::GraphDefBuilder::Options const&)'
/home/ks/OpenSource/tf/shubham/deepdetect/tests/opencv_tensor.cc:46: undefined reference to `tensorflow::ops::ReadFile(tensorflow::NodeBuilder::NodeOut, tensorflow::GraphDefBuilder::Options const&)'
/home/ks/OpenSource/tf/shubham/deepdetect/tests/opencv_tensor.cc:58: undefined reference to `tensorflow::ops::DecodeJpeg(tensorflow::NodeBuilder::NodeOut, tensorflow::GraphDefBuilder::Options const&)'
/home
Script started on Tuesday 12 April 2016 03:36:35 AM IST
]0;ks@kyrs: ~/OpenSource/deepdetect/build_new/mainks@kyrs:~/OpenSource/deepdetect/build_new/main$ git clone -b tf https://github.com/beniz/deepdetect.gitinit exitmake
[ 6%] Building CXX object src/CMakeFiles/ddetect.dir/caffeinputconns.cc.o
In file included from /home/ks/OpenSource/deepdetect/build_new/tensorflow/src/tensorflow/dbuild/fa11b87ef038ea0a72c0d3b71766755e/tensorflow/tensorflow/core/platform/logging.h:24:0,
from /home/ks/OpenSource/deepdetect/build_new/tensorflow/src/tensorflow/dbuild/fa11b87ef038ea0a72c0d3b71766755e/tensorflow/tensorflow/core/lib/gtl/array_slice_internal.h:32,
from /home/ks/OpenSource/deepdetect/build_new/tensorflow/src/tensorflow/dbuild/fa11b87ef038ea0a72c0d3b71766755e/tensorflow/tensorflow/core/lib/gtl/array_slice.h:101,
from /home/ks/OpenSource/deepdetect/build_new/tensorflow/src/tensorflow
name: "VGG_FACE_16_layer"
layer {
name: "vgg_face"
type: "MemoryData"
top: "data"
top: "label"
memory_data_param {
batch_size: 10
channels: 3
name: "VGG_FACE_16_layers"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
layers {
bottom: "data"
top: "conv1_1"
name: "conv1_1"
import os, sys, argparse
from os import listdir
from os.path import isfile, join
from os import walk
from dd_client import DD
from annoy import AnnoyIndex
import shelve
import cv2
parser = argparse.ArgumentParser()
@kyrs
kyrs / opencv_tensor.cc
Last active February 15, 2024 12:44
File Takes an Image Mat file as an input and convert it to tensor.
/*
Following file take opencv mat file as an input and run inception model on it
Created by : Kumar Shubham
Date : 27-03-2016
*/
//Loading Opencv fIles for processing
#include <opencv2/opencv.hpp>