Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jabir366 committed Oct 9, 2018
0 parents commit 9490936
Show file tree
Hide file tree
Showing 76 changed files with 5,111 additions and 0 deletions.
Binary file added REPORT/IJSER_Template.docx
Binary file not shown.
Binary file added REPORT/imgs/Dataset creation and Augmentation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/Level 0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/Level 1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/cnf97.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/cnn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/gray_2.8_96.97.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/model_gray_2.8_96.97.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/predic2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/realtime testing.pdf
Binary file not shown.
Binary file added REPORT/imgs/realtime testing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added REPORT/imgs/segmentation.pdf
Binary file not shown.
Binary file added REPORT/new/Appendix.docx
Binary file not shown.
Binary file added REPORT/new/Appendix.pdf
Binary file not shown.
Binary file added REPORT/new/MCNNContent.pdf
Binary file not shown.
Binary file added REPORT/new/MCNNcontent (Repaired).docx
Binary file not shown.
Binary file added REPORT/new/contentlist.docx
Binary file not shown.
Binary file added REPORT/new/contentlist.pdf
Binary file not shown.
Binary file added REPORT/new/jabFront page.docx
Binary file not shown.
Binary file added REPORT/new/jabFront page.pdf
Binary file not shown.
77 changes: 77 additions & 0 deletions Utilities.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import cv2\n",
"import os\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"#for plotting image\n",
"def mplot(img,img2=None):\n",
" \n",
" cv2.namedWindow('img',cv2.WINDOW_NORMAL)\n",
" cv2.imshow('img',img)\n",
" if img2 is not None:\n",
" cv2.namedWindow('img2',cv2.WINDOW_NORMAL)\n",
" cv2.imshow('img2',img2)\n",
" cv2.waitKey(0)\n",
" cv2.destroyAllWindows()\n",
" \n",
"#returns a list of output classes along with labels, character images and their class\n",
"def getClassImagesWithLabels():\n",
" path='/home/jabir/Project/MHCR/DATASET'\n",
" file='/MD0.jpg'\n",
" ls=[]\n",
" for dir in os.listdir(path):\n",
" print(dir.split(\"R\")[1])\n",
" im=cv2.imread(os.path.join(path,dir+file),0)\n",
" ls.append([int(dir.split(\"R\")[1]),im])\n",
" print(len(ls))\n",
" ls.sort()\n",
" cls_label=[]\n",
" for class_img in ls:\n",
" m=class_img[1]\n",
" cv2.putText(m,str(class_img[0]),(10,10),0,0.3,(0,0,0))\n",
" cls_label.append(m)\n",
" #mplot(m)\n",
" return cls_label\n",
"#returns a numpy array of unicode of all output classes\n",
"def getMalForClasses():\n",
" mal=np.array([3333, 3334, 3335, 3337, 3339, 3342, 3343, 3346, 3349, 3350, 3351,\n",
" 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361, 3362,\n",
" 3363, 3364, 3365, 3366, 3367, 3368, 3370, 3371, 3372, 3373, 3374,\n",
" 3375, 3376, 3378, 3381, 3382, 3383, 3384, 3385, 3380, 3379, 3377])\n",
" return mal\n",
" \n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.5"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Binary file added cls_labels.npy
Binary file not shown.
24 changes: 24 additions & 0 deletions cmarg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python
import argparse
import os
import cv2
parser = argparse.argumentparser()
#parser.add_argument("square", help="display a square of a given number",
# type=int)
parser.add_argument("file",help="just echoing")
args = parser.parse_args()
#print(args.square**2)
#print(args.echo)
def mplot(img,img2=none):

cv2.namedwindow('img',cv2.window_normal)
cv2.movewindow('img', 600,300)
cv2.imshow('img',img)
if img2 is not none:
cv2.namedwindow('img2',cv2.window_normal)
cv2.movewindow('img', 600,600)
cv2.imshow('img2',img2)
cv2.waitkey(0)
cv2.destroyallwindows()
img=cv2.imread(args.file)
mplot(img)
Loading

0 comments on commit 9490936

Please sign in to comment.