28 KiB
28 KiB
import numpy as np
import pandas as pd
import cv2
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Flatten, Dropout, Activation, Conv2D, MaxPooling2D
# Input data files are available in the "../input/" directory.
# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory
import os
print(os.listdir("Biedap/input"))
import zipfile
with zipfile.ZipFile("Biedap/input/train.zip","r") as z:
z.extractall(".")
with zipfile.ZipFile("Biedap/input/test1.zip","r") as z:
z.extractall(".")
# Any results you write to the current directory are saved as output.
[0;31m---------------------------------------------------------------------------[0m [0;31mKeyboardInterrupt[0m Traceback (most recent call last) Input [0;32mIn [1][0m, in [0;36m<cell line: 4>[0;34m()[0m [1;32m 2[0m [38;5;28;01mimport[39;00m [38;5;21;01mpandas[39;00m [38;5;28;01mas[39;00m [38;5;21;01mpd[39;00m [1;32m 3[0m [38;5;28;01mimport[39;00m [38;5;21;01mcv2[39;00m [0;32m----> 4[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mpyplot[39;00m [38;5;28;01mas[39;00m [38;5;21;01mplt[39;00m [1;32m 5[0m [38;5;28;01mimport[39;00m [38;5;21;01mtensorflow[39;00m [38;5;28;01mas[39;00m [38;5;21;01mtf[39;00m [1;32m 6[0m [38;5;28;01mfrom[39;00m [38;5;21;01mtensorflow[39;00m[38;5;21;01m.[39;00m[38;5;21;01mkeras[39;00m[38;5;21;01m.[39;00m[38;5;21;01mmodels[39;00m [38;5;28;01mimport[39;00m Sequential File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/pyplot.py:49[0m, in [0;36m<module>[0;34m[0m [1;32m 47[0m [38;5;28;01mfrom[39;00m [38;5;21;01mcycler[39;00m [38;5;28;01mimport[39;00m cycler [1;32m 48[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m [0;32m---> 49[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mcolorbar[39;00m [1;32m 50[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mimage[39;00m [1;32m 51[0m [38;5;28;01mfrom[39;00m [38;5;21;01mmatplotlib[39;00m [38;5;28;01mimport[39;00m _api File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/colorbar.py:21[0m, in [0;36m<module>[0;34m[0m [1;32m 18[0m [38;5;28;01mimport[39;00m [38;5;21;01mnumpy[39;00m [38;5;28;01mas[39;00m [38;5;21;01mnp[39;00m [1;32m 20[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m [38;5;28;01mas[39;00m [38;5;21;01mmpl[39;00m [0;32m---> 21[0m [38;5;28;01mfrom[39;00m [38;5;21;01mmatplotlib[39;00m [38;5;28;01mimport[39;00m _api, collections, cm, colors, contour, ticker [1;32m 22[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01martist[39;00m [38;5;28;01mas[39;00m [38;5;21;01mmartist[39;00m [1;32m 23[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mpatches[39;00m [38;5;28;01mas[39;00m [38;5;21;01mmpatches[39;00m File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/contour.py:13[0m, in [0;36m<module>[0;34m[0m [1;32m 11[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m [38;5;28;01mas[39;00m [38;5;21;01mmpl[39;00m [1;32m 12[0m [38;5;28;01mfrom[39;00m [38;5;21;01mmatplotlib[39;00m [38;5;28;01mimport[39;00m _api, docstring [0;32m---> 13[0m [38;5;28;01mfrom[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mbackend_bases[39;00m [38;5;28;01mimport[39;00m MouseButton [1;32m 14[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mpath[39;00m [38;5;28;01mas[39;00m [38;5;21;01mmpath[39;00m [1;32m 15[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mticker[39;00m [38;5;28;01mas[39;00m [38;5;21;01mticker[39;00m File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/backend_bases.py:46[0m, in [0;36m<module>[0;34m[0m [1;32m 43[0m [38;5;28;01mimport[39;00m [38;5;21;01mnumpy[39;00m [38;5;28;01mas[39;00m [38;5;21;01mnp[39;00m [1;32m 45[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m [38;5;28;01mas[39;00m [38;5;21;01mmpl[39;00m [0;32m---> 46[0m [38;5;28;01mfrom[39;00m [38;5;21;01mmatplotlib[39;00m [38;5;28;01mimport[39;00m ( [1;32m 47[0m _api, backend_tools [38;5;28;01mas[39;00m tools, cbook, colors, docstring, textpath, [1;32m 48[0m tight_bbox, transforms, widgets, get_backend, is_interactive, rcParams) [1;32m 49[0m [38;5;28;01mfrom[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01m_pylab_helpers[39;00m [38;5;28;01mimport[39;00m Gcf [1;32m 50[0m [38;5;28;01mfrom[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mbackend_managers[39;00m [38;5;28;01mimport[39;00m ToolManager File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/widgets.py:22[0m, in [0;36m<module>[0;34m[0m [1;32m 20[0m [38;5;28;01mfrom[39;00m [38;5;21;01m.[39;00m [38;5;28;01mimport[39;00m _api, backend_tools, cbook, colors, ticker [1;32m 21[0m [38;5;28;01mfrom[39;00m [38;5;21;01m.[39;00m[38;5;21;01mlines[39;00m [38;5;28;01mimport[39;00m Line2D [0;32m---> 22[0m [38;5;28;01mfrom[39;00m [38;5;21;01m.[39;00m[38;5;21;01mpatches[39;00m [38;5;28;01mimport[39;00m Circle, Rectangle, Ellipse [1;32m 23[0m [38;5;28;01mfrom[39;00m [38;5;21;01m.[39;00m[38;5;21;01mtransforms[39;00m [38;5;28;01mimport[39;00m TransformedPatchPath [1;32m 26[0m [38;5;28;01mclass[39;00m [38;5;21;01mLockDraw[39;00m: File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/patches.py:4143[0m, in [0;36m<module>[0;34m[0m [1;32m 4138[0m [38;5;124;03m"""Return the `.Bbox`."""[39;00m [1;32m 4139[0m [38;5;28;01mreturn[39;00m transforms[38;5;241m.[39mBbox[38;5;241m.[39mfrom_bounds([38;5;28mself[39m[38;5;241m.[39m_x, [38;5;28mself[39m[38;5;241m.[39m_y, [1;32m 4140[0m [38;5;28mself[39m[38;5;241m.[39m_width, [38;5;28mself[39m[38;5;241m.[39m_height) [0;32m-> 4143[0m [38;5;28;01mclass[39;00m [38;5;21;01mFancyArrowPatch[39;00m(Patch): [1;32m 4144[0m [38;5;124;03m"""[39;00m [1;32m 4145[0m [38;5;124;03m A fancy arrow patch. It draws an arrow using the `ArrowStyle`.[39;00m [1;32m 4146[0m [0;32m (...)[0m [1;32m 4149[0m [38;5;124;03m does not change when the axis is moved or zoomed.[39;00m [1;32m 4150[0m [38;5;124;03m """[39;00m [1;32m 4151[0m _edge_default [38;5;241m=[39m [38;5;28;01mTrue[39;00m File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/artist.py:119[0m, in [0;36mArtist.__init_subclass__[0;34m(cls)[0m [1;32m 117[0m [38;5;28mcls[39m[38;5;241m.[39mset[38;5;241m.[39m[38;5;18m__name__[39m [38;5;241m=[39m [38;5;124m"[39m[38;5;124mset[39m[38;5;124m"[39m [1;32m 118[0m [38;5;28mcls[39m[38;5;241m.[39mset[38;5;241m.[39m[38;5;18m__qualname__[39m [38;5;241m=[39m [38;5;124mf[39m[38;5;124m"[39m[38;5;132;01m{[39;00m[38;5;28mcls[39m[38;5;241m.[39m[38;5;18m__qualname__[39m[38;5;132;01m}[39;00m[38;5;124m.set[39m[38;5;124m"[39m [0;32m--> 119[0m [38;5;28;43mcls[39;49m[38;5;241;43m.[39;49m[43m_update_set_signature_and_docstring[49m[43m([49m[43m)[49m File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/artist.py:147[0m, in [0;36mArtist._update_set_signature_and_docstring[0;34m(cls)[0m [1;32m 137[0m [38;5;28mcls[39m[38;5;241m.[39mset[38;5;241m.[39m__signature__ [38;5;241m=[39m Signature( [1;32m 138[0m [Parameter([38;5;124m"[39m[38;5;124mself[39m[38;5;124m"[39m, Parameter[38;5;241m.[39mPOSITIONAL_OR_KEYWORD), [1;32m 139[0m [38;5;241m*[39m[Parameter(prop, Parameter[38;5;241m.[39mKEYWORD_ONLY, default[38;5;241m=[39m_UNSET) [1;32m 140[0m [38;5;28;01mfor[39;00m prop [38;5;129;01min[39;00m ArtistInspector([38;5;28mcls[39m)[38;5;241m.[39mget_setters() [1;32m 141[0m [38;5;28;01mif[39;00m prop [38;5;129;01mnot[39;00m [38;5;129;01min[39;00m Artist[38;5;241m.[39m_PROPERTIES_EXCLUDED_FROM_SET]]) [1;32m 142[0m [38;5;28mcls[39m[38;5;241m.[39mset[38;5;241m.[39m_autogenerated_signature [38;5;241m=[39m [38;5;28;01mTrue[39;00m [1;32m 144[0m [38;5;28mcls[39m[38;5;241m.[39mset[38;5;241m.[39m[38;5;18m__doc__[39m [38;5;241m=[39m ( [1;32m 145[0m [38;5;124m"[39m[38;5;124mSet multiple properties at once.[39m[38;5;130;01m\n[39;00m[38;5;130;01m\n[39;00m[38;5;124m"[39m [1;32m 146[0m [38;5;124m"[39m[38;5;124mSupported properties are[39m[38;5;130;01m\n[39;00m[38;5;130;01m\n[39;00m[38;5;124m"[39m [0;32m--> 147[0m [38;5;241m+[39m [43mkwdoc[49m[43m([49m[38;5;28;43mcls[39;49m[43m)[49m) File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/artist.py:1749[0m, in [0;36mkwdoc[0;34m(artist)[0m [1;32m 1731[0m [38;5;124mr[39m[38;5;124;03m"""[39;00m [1;32m 1732[0m [38;5;124;03mInspect an `~matplotlib.artist.Artist` class (using `.ArtistInspector`) and[39;00m [1;32m 1733[0m [38;5;124;03mreturn information about its settable properties and their current values.[39;00m [0;32m (...)[0m [1;32m 1744[0m [38;5;124;03m use in Sphinx) if it is True.[39;00m [1;32m 1745[0m [38;5;124;03m"""[39;00m [1;32m 1746[0m ai [38;5;241m=[39m ArtistInspector(artist) [1;32m 1747[0m [38;5;28;01mreturn[39;00m ([38;5;124m'[39m[38;5;130;01m\n[39;00m[38;5;124m'[39m[38;5;241m.[39mjoin(ai[38;5;241m.[39mpprint_setters_rest(leadingspace[38;5;241m=[39m[38;5;241m4[39m)) [1;32m 1748[0m [38;5;28;01mif[39;00m mpl[38;5;241m.[39mrcParams[[38;5;124m'[39m[38;5;124mdocstring.hardcopy[39m[38;5;124m'[39m] [38;5;28;01melse[39;00m [0;32m-> 1749[0m [38;5;124m'[39m[38;5;124mProperties:[39m[38;5;130;01m\n[39;00m[38;5;124m'[39m [38;5;241m+[39m [38;5;124m'[39m[38;5;130;01m\n[39;00m[38;5;124m'[39m[38;5;241m.[39mjoin([43mai[49m[38;5;241;43m.[39;49m[43mpprint_setters[49m[43m([49m[43mleadingspace[49m[38;5;241;43m=[39;49m[38;5;241;43m4[39;49m[43m)[49m)) File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/artist.py:1509[0m, in [0;36mArtistInspector.pprint_setters[0;34m(self, prop, leadingspace)[0m [1;32m 1506[0m [38;5;28;01mreturn[39;00m [38;5;124m'[39m[38;5;132;01m%s[39;00m[38;5;132;01m%s[39;00m[38;5;124m: [39m[38;5;132;01m%s[39;00m[38;5;124m'[39m [38;5;241m%[39m (pad, prop, accepts) [1;32m 1508[0m lines [38;5;241m=[39m [] [0;32m-> 1509[0m [38;5;28;01mfor[39;00m prop [38;5;129;01min[39;00m [38;5;28msorted[39m([38;5;28;43mself[39;49m[38;5;241;43m.[39;49m[43mget_setters[49m[43m([49m[43m)[49m): [1;32m 1510[0m accepts [38;5;241m=[39m [38;5;28mself[39m[38;5;241m.[39mget_valid_values(prop) [1;32m 1511[0m name [38;5;241m=[39m [38;5;28mself[39m[38;5;241m.[39maliased_name(prop) File [0;32m~/anaconda3/lib/python3.9/site-packages/matplotlib/artist.py:1435[0m, in [0;36mArtistInspector.get_setters[0;34m(self)[0m [1;32m 1432[0m [38;5;28;01mcontinue[39;00m [1;32m 1433[0m func [38;5;241m=[39m [38;5;28mgetattr[39m([38;5;28mself[39m[38;5;241m.[39mo, name) [1;32m 1434[0m [38;5;28;01mif[39;00m ([38;5;129;01mnot[39;00m callable(func) [0;32m-> 1435[0m [38;5;129;01mor[39;00m [38;5;28mlen[39m([43minspect[49m[38;5;241;43m.[39;49m[43msignature[49m[43m([49m[43mfunc[49m[43m)[49m[38;5;241m.[39mparameters) [38;5;241m<[39m [38;5;241m2[39m [1;32m 1436[0m [38;5;129;01mor[39;00m [38;5;28mself[39m[38;5;241m.[39mis_alias(func)): [1;32m 1437[0m [38;5;28;01mcontinue[39;00m [1;32m 1438[0m setters[38;5;241m.[39mappend(name[[38;5;241m4[39m:]) File [0;32m~/anaconda3/lib/python3.9/inspect.py:3113[0m, in [0;36msignature[0;34m(obj, follow_wrapped)[0m [1;32m 3111[0m [38;5;28;01mdef[39;00m [38;5;21msignature[39m(obj, [38;5;241m*[39m, follow_wrapped[38;5;241m=[39m[38;5;28;01mTrue[39;00m): [1;32m 3112[0m [38;5;124;03m"""Get a signature object for the passed callable."""[39;00m [0;32m-> 3113[0m [38;5;28;01mreturn[39;00m [43mSignature[49m[38;5;241;43m.[39;49m[43mfrom_callable[49m[43m([49m[43mobj[49m[43m,[49m[43m [49m[43mfollow_wrapped[49m[38;5;241;43m=[39;49m[43mfollow_wrapped[49m[43m)[49m File [0;32m~/anaconda3/lib/python3.9/inspect.py:2862[0m, in [0;36mSignature.from_callable[0;34m(cls, obj, follow_wrapped)[0m [1;32m 2859[0m [38;5;129m@classmethod[39m [1;32m 2860[0m [38;5;28;01mdef[39;00m [38;5;21mfrom_callable[39m([38;5;28mcls[39m, obj, [38;5;241m*[39m, follow_wrapped[38;5;241m=[39m[38;5;28;01mTrue[39;00m): [1;32m 2861[0m [38;5;124;03m"""Constructs Signature for the given callable object."""[39;00m [0;32m-> 2862[0m [38;5;28;01mreturn[39;00m [43m_signature_from_callable[49m[43m([49m[43mobj[49m[43m,[49m[43m [49m[43msigcls[49m[38;5;241;43m=[39;49m[38;5;28;43mcls[39;49m[43m,[49m [1;32m 2863[0m [43m [49m[43mfollow_wrapper_chains[49m[38;5;241;43m=[39;49m[43mfollow_wrapped[49m[43m)[49m File [0;32m~/anaconda3/lib/python3.9/inspect.py:2325[0m, in [0;36m_signature_from_callable[0;34m(obj, follow_wrapper_chains, skip_bound_arg, sigcls)[0m [1;32m 2320[0m [38;5;28;01mreturn[39;00m sig[38;5;241m.[39mreplace(parameters[38;5;241m=[39mnew_params) [1;32m 2322[0m [38;5;28;01mif[39;00m isfunction(obj) [38;5;129;01mor[39;00m _signature_is_functionlike(obj): [1;32m 2323[0m [38;5;66;03m# If it's a pure Python function, or an object that is duck type[39;00m [1;32m 2324[0m [38;5;66;03m# of a Python function (Cython functions, for instance), then:[39;00m [0;32m-> 2325[0m [38;5;28;01mreturn[39;00m [43m_signature_from_function[49m[43m([49m[43msigcls[49m[43m,[49m[43m [49m[43mobj[49m[43m,[49m [1;32m 2326[0m [43m [49m[43mskip_bound_arg[49m[38;5;241;43m=[39;49m[43mskip_bound_arg[49m[43m)[49m [1;32m 2328[0m [38;5;28;01mif[39;00m _signature_is_builtin(obj): [1;32m 2329[0m [38;5;28;01mreturn[39;00m _signature_from_builtin(sigcls, obj, [1;32m 2330[0m skip_bound_arg[38;5;241m=[39mskip_bound_arg) File [0;32m~/anaconda3/lib/python3.9/inspect.py:2196[0m, in [0;36m_signature_from_function[0;34m(cls, func, skip_bound_arg)[0m [1;32m 2194[0m kind [38;5;241m=[39m _POSITIONAL_ONLY [38;5;28;01mif[39;00m posonly_left [38;5;28;01melse[39;00m _POSITIONAL_OR_KEYWORD [1;32m 2195[0m annotation [38;5;241m=[39m annotations[38;5;241m.[39mget(name, _empty) [0;32m-> 2196[0m parameters[38;5;241m.[39mappend([43mParameter[49m[43m([49m[43mname[49m[43m,[49m[43m [49m[43mannotation[49m[38;5;241;43m=[39;49m[43mannotation[49m[43m,[49m [1;32m 2197[0m [43m [49m[43mkind[49m[38;5;241;43m=[39;49m[43mkind[49m[43m)[49m) [1;32m 2198[0m [38;5;28;01mif[39;00m posonly_left: [1;32m 2199[0m posonly_left [38;5;241m-[39m[38;5;241m=[39m [38;5;241m1[39m File [0;32m~/anaconda3/lib/python3.9/inspect.py:2518[0m, in [0;36mParameter.__init__[0;34m(self, name, kind, default, annotation)[0m [1;32m 2515[0m msg [38;5;241m=[39m [38;5;124m'[39m[38;5;124mname must be a str, not a [39m[38;5;132;01m{}[39;00m[38;5;124m'[39m[38;5;241m.[39mformat([38;5;28mtype[39m(name)[38;5;241m.[39m[38;5;18m__name__[39m) [1;32m 2516[0m [38;5;28;01mraise[39;00m [38;5;167;01mTypeError[39;00m(msg) [0;32m-> 2518[0m [38;5;28;01mif[39;00m [43mname[49m[43m[[49m[38;5;241;43m0[39;49m[43m][49m[43m [49m[38;5;241;43m==[39;49m[43m [49m[38;5;124;43m'[39;49m[38;5;124;43m.[39;49m[38;5;124;43m'[39;49m [38;5;129;01mand[39;00m name[[38;5;241m1[39m:][38;5;241m.[39misdigit(): [1;32m 2519[0m [38;5;66;03m# These are implicit arguments generated by comprehensions. In[39;00m [1;32m 2520[0m [38;5;66;03m# order to provide a friendlier interface to users, we recast[39;00m [1;32m 2521[0m [38;5;66;03m# their name as "implicitN" and treat them as positional-only.[39;00m [1;32m 2522[0m [38;5;66;03m# See issue 19611.[39;00m [1;32m 2523[0m [38;5;28;01mif[39;00m [38;5;28mself[39m[38;5;241m.[39m_kind [38;5;241m!=[39m _POSITIONAL_OR_KEYWORD: [1;32m 2524[0m msg [38;5;241m=[39m ( [1;32m 2525[0m [38;5;124m'[39m[38;5;124mimplicit arguments must be passed as [39m[38;5;124m'[39m [1;32m 2526[0m [38;5;124m'[39m[38;5;124mpositional or keyword arguments, not [39m[38;5;132;01m{}[39;00m[38;5;124m'[39m [1;32m 2527[0m ) [0;31mKeyboardInterrupt[0m:
main_dir = "Biedap"
train_dir = "train"
path = os.path.join(main_dir,train_dir)
for p in os.listdir(path):
category = p.split(".")[0]
img_array = cv2.imread(os.path.join(path,p),cv2.IMREAD_GRAYSCALE)
new_img_array = cv2.resize(img_array, dsize=(80, 80))
plt.imshow(new_img_array,cmap="gray")
break
X = []
y = []
convert = lambda category : int(category == 'dog')
def create_test_data(path):
for p in os.listdir(path):
category = p.split(".")[0]
category = convert(category)
img_array = cv2.imread(os.path.join(path,p),cv2.IMREAD_GRAYSCALE)
new_img_array = cv2.resize(img_array, dsize=(80, 80))
X.append(new_img_array)
y.append(category)
create_test_data(path)
X = np.array(X).reshape(-1, 80,80,1)
y = np.array(y)
X = X/255.0
model = Sequential()
# Adds a densely-connected layer with 64 units to the model:
model.add(Conv2D(64,(3,3), activation = 'relu', input_shape = X.shape[1:]))
model.add(MaxPooling2D(pool_size = (2,2)))
# Add another:
model.add(Conv2D(64,(3,3), activation = 'relu'))
model.add(MaxPooling2D(pool_size = (2,2)))
model.add(Flatten())
model.add(Dense(64, activation='relu'))
# Add a softmax layer with 10 output units:
model.add(Dense(1, activation='sigmoid'))
model.compile(optimizer="adam",
loss='binary_crossentropy',
metrics=['accuracy'])
model.fit(X, y, epochs=10, batch_size=32, validation_split=0.2)
train_dir = "test1"
path = os.path.join(main_dir,train_dir)
#os.listdir(path)
X_test = []
id_line = []
def create_test1_data(path):
for p in os.listdir(path):
id_line.append(p.split(".")[0])
img_array = cv2.imread(os.path.join(path,p),cv2.IMREAD_GRAYSCALE)
new_img_array = cv2.resize(img_array, dsize=(80, 80))
X_test.append(new_img_array)
create_test1_data(path)
X_test = np.array(X_test).reshape(-1,80,80,1)
X_test = X_test/255
predictions = model.predict(X_test)
predicted_val = [int(round(p[0])) for p in predictions]
submission_df = pd.DataFrame({'id':id_line, 'label':predicted_val})
submission_df.to_csv("submission.csv", index=False)