Skip to content

Instantly share code, notes, and snippets.

View Coderx7's full-sized avatar
💭
In God we Trust!

Seyyed Hossein Hasanpour Coderx7

💭
In God we Trust!
  • IRAN
  • 02:37 (UTC +03:30)
View GitHub Profile
@Coderx7
Coderx7 / caffe_feature_extractor.py
Last active July 22, 2017 17:47 — forked from marekrei/caffe_feature_extractor.py
Caffe feature extractor
#in the name of Allah, the most compassionate the most merciful
#run this scrip under python2. python3 would work, but not prefectly. e.g. running this script and setting oversample to true in
#net.predict([input_image], oversample=True) will cause a crash. but it works just fine under python2.
import numpy as np
import os, sys, getopt
# Main path to your caffe installation
caffe_root = '/path/to/your/caffe/'
# Model prototxt file
@Coderx7
Coderx7 / load_jpeg_with_tensorflow.py
Created April 8, 2017 06:20 — forked from eerwitt/load_jpeg_with_tensorflow.py
Example loading multiple JPEG files with TensorFlow and make them available as Tensors with the shape [[R, G, B], ... ].
# Typical setup to include TensorFlow.
import tensorflow as tf
# Make a queue of file names including all the JPEG images files in the relative
# image directory.
filename_queue = tf.train.string_input_producer(
tf.train.match_filenames_once("./images/*.jpg"))
# Read an entire image file which is required since they're JPEGs, if the images
# are too large they could be split in advance to smaller files or use the Fixed
@Coderx7
Coderx7 / Caffe_Convnet_ConfuxionMatrix.py
Last active November 19, 2018 10:02 — forked from axel-angel/convnet_test.py
Caffe script to compute accuracy and confusion matrix, Added mean subtraction. it now accurately reports the accuracy (just like caffe)
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: Axel Angel, copyright 2015, license GPLv3.
# added mean subtraction so that, the accuracy can be reported accurately just like caffe when doing a mean subtraction
# Seyyed Hossein Hasan Pour
# Coderx7@Gmail.com
# 7/3/2016
import sys
@Coderx7
Coderx7 / Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明.md
Created May 18, 2016 13:54 — forked from bearpaw/Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明.md
Caffe + Ubuntu 12.04 / 14.04 64bit + CUDA 6.5 / 7.0 配置说明

Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明

本步骤能实现用Intel核芯显卡来进行显示, 用NVIDIA GPU进行计算。

1. 安装开发所需的依赖包

安装开发所需要的一些基本包

sudo apt-get install build-essential
sudo apt-get install vim cmake git
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
@Coderx7
Coderx7 / maxout_layer
Created May 9, 2016 18:28 — forked from erogol/maxout_layer
maxout layer implementation for caffe library
layers {
name: "conv1A"
type: CONVOLUTION
bottom: "data"
top: "conv1A"
blobs_lr: 1
blobs_lr: 2
weight_decay: 1
weight_decay: 0
convolution_param {