Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenyerga authored and Eritz Yerga Gutierrez committed Nov 27, 2017
1 parent 8a96d7f commit 1334f0f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Notebook/Handwitten-Name-Recognition-ANNs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"# Use:\n",
"# 'load': If you want to load the datase from the directory\n",
"# 'download': To download data from the database and process the images\n",
"dataset_load_method = 'download'\n",
"dataset_load_method = 'load'\n",
"\n",
"# Define if you want to save the dataset to a file\n",
"save_dataset = False\n",
Expand All @@ -45,10 +45,10 @@
"load_classifiers = False\n",
"\n",
"# Define if you want to save the trained classifiers to a file\n",
"save_classifiers = False\n",
"save_classifiers = True\n",
"\n",
"# Define if you want to save classification test output to a file\n",
"save_results = False\n",
"save_results = True\n",
"if (save_results):\n",
" result_output_file = open('result_output.txt','w') \n",
"\n",
Expand Down Expand Up @@ -492,7 +492,12 @@
"source": [
"def labelsep(label):\n",
" if (type(label) is str or type(label) is np.str_):\n",
" return list(label)\n",
" decomposed_label = list(label)\n",
" labels = []\n",
" for i in range(0, len(decomposed_label)):\n",
" if (decomposed_label[i] != ' '):\n",
" labels.append(decomposed_label[i])\n",
" return labels\n",
" else:\n",
" return []"
]
Expand Down Expand Up @@ -731,7 +736,7 @@
" if (len(characters) != len(charlabels) or len(characters) == 0 or len(charlabels) == 0):\n",
" if (enable_error_output):\n",
" print(\"[Warning] Input number \"+str(i)+\" inconsistent! Skipping this one...\")\n",
" Train_with_inconsistencies.extend([i])\n",
" Train_with_inconsistencies.append(i)\n",
" z += 1\n",
" else:\n",
" X_train_chars.extend(characters)\n",
Expand Down Expand Up @@ -773,7 +778,7 @@
" else:\n",
" X_test_chars.extend(characters)\n",
" Y_test_chars.extend(charlabels)\n",
" Test_without_inconsistencies.extend([i])\n",
" Test_without_inconsistencies.append(i)\n",
"\n",
"print_percentage(100, \"Processing train image \"+ str(len(X_test))+\" :\")\n",
"print(\"\")\n",
Expand Down
Binary file modified Notebook/TrainedClassifiers/10000 images/MLP.7z
Binary file not shown.
Binary file modified Notebook/TrainedClassifiers/10000 images/MLP_HOG.7z
Binary file not shown.
Binary file modified Notebook/TrainedClassifiers/10000 images/MLP_PCA.7z
Binary file not shown.
Binary file not shown.
Binary file removed Notebook/TrainedClassifiers/10000 images/RBM-MLP.7z
Binary file not shown.
Binary file added Notebook/TrainedClassifiers/10000 images/RBM.7z
Binary file not shown.
Binary file not shown.

0 comments on commit 1334f0f

Please sign in to comment.