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!
View GitHub Profile
@Coderx7
Coderx7 / Install NVIDIA Driver and CUDA.md
Created April 11, 2018 19:56 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 8.0 on Ubuntu 16.04.3 LTS
@Coderx7
Coderx7 / Install NVIDIA Driver and CUDA.md
Created April 11, 2018 19:56 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@Coderx7
Coderx7 / live_plot_notebook.py
Last active March 28, 2018 19:07 — forked from wassname/live_plot_notebook.py
Live plot using %matplotlib notebook in jupyter notebook
#برای نمایش بلادرنگ نمودار ترینینگ و تست ما
import numpy as np
from matplotlib import pyplot as plt
class LivePlotNotebook(object):
"""
Live plot using %matplotlib notebook in jupyter notebook
original url : https://gist.github.com/wassname/04e77eb821447705b399e8e7a6d082ce
"""
@Coderx7
Coderx7 / tsne visualization.py
Created March 28, 2018 04:17 — forked from dineshj1/tsne visualization
t-SNE visualization code
# Dinesh Jayaraman
# Based on code by
# Authors: Fabian Pedregosa <[email protected]>
# Olivier Grisel <[email protected]>
# Mathieu Blondel <[email protected]>
# Gael Varoquaux
# License: BSD 3 clause (C) INRIA 2011
print(__doc__)
@Coderx7
Coderx7 / pycaffe training script.py
Last active March 28, 2018 04:15 — forked from dineshj1/pycaffe training script
Training on Pycaffe
import argparse
import time
start_time=time.time();
################## Argument Parsing #####################################
parser=argparse.ArgumentParser();
parser.add_argument('-s','--solver', default='', type=str); # if empty, solver is created, else read
parser.add_argument('-res', '--resume_from', default='', type=str); #if not empty, resumes training from given file
parser.add_argument('-ft', '--finetune_from', default='', type=str);
@Coderx7
Coderx7 / confusionMatrix_Precison_Recall_F1Score_BatchMode.py
Last active September 22, 2017 20:32
its like the previous script for calculating ConfusionMatrix,Precision,Recall and stuff like before but with more preprocessing,(cropping,mean subtraction, etc)
#in the name of God the most compassionate the most merciful
# added mean subtraction so that, the accuracy can be reported accurately just like caffe when doing a mean subtraction
# Seyyed Hossein Hasan Pour
# [email protected]
# 7/3/2016
# Added Recall/Precision/F1-Score as well
# 01/03/2017
# added classification using caffe.classifier, which lets you do oversampling (allows for multiple preprocessing options and crops) + the manual center crop
# method. its sloppy at the moment. for some reason, caffe.classifier's predict method, provides less accuracy compared to the caffes test accuracy
# the manuall center crop (i.e. the one which uses Caffe.Net, works just well and achieves the same accuracy as Caffe's)
@Coderx7
Coderx7 / confusionMatrix_convnet_test_BatchMode(VeryFast).py
Last active September 3, 2019 08:22
Caffe confusion matrix, precision and recall and F1 Score script!
#in the name of God the most compassionate the most merciful
# added mean subtraction so that, the accuracy can be reported accurately just like caffe when doing a mean subtraction
# Seyyed Hossein Hasan Pour
# [email protected]
# 7/3/2016
# Added Recall/Precision/F1-Score as well
# 01/03/2017
# Added batch processing, not what used to take a minute or so, takes only several seconds!
# 07/25/2017
#info:
@Coderx7
Coderx7 / confusionMatrix_precision_recall_F1Score_caffe2.py
Last active July 23, 2017 08:27
confusionMatrix precision recall F1Score now with caffe classifier which allows for more preprocessing options!
# Seyyed Hossein Hasan Pour
# [email protected]
# 7/3/2016
# Added Recall/Precision/F1-Score as well
# 01/03/2017
#info:
#if on windows, one can use these command in a batch file and ease him/her self
#REM Calculating Confusing Matrix
#python confusionMatrix_convnet_test.py --proto cifar10_deploy.prototxt --model cifar10_.caffemodel --mean mean.binaryproto --lmdb cifar10_test_lmdb
#pause
@Coderx7
Coderx7 / binaryprotoTonpy.py
Last active January 1, 2020 09:28
A script for converting Caffe's binaryproto mean file to npy format
#In the name of God
#Use this script to convert a binaryproto mean file to an equivalent python npy mean file.
#simply use the script like this :
#python convert_protomean.py mean.binaryproto mean.npy"
import caffe
import numpy as np
import sys
if len(sys.argv) != 3:
print "Usage: python convert_protomean.py mean.binaryproto mean.npy"
@Coderx7
Coderx7 / wrn_128_v8.prototxt
Created April 24, 2017 08:04
wideresidual network in caffe_wrn_128_v8
name: "wrn_128_v8"
layer {
name: "Data1"
type: "Data"
top: "Data1"
top: "Data2"
include {
phase: TRAIN
}
transform_param {