{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-03-28T22:20:15.381629Z","iopub.execute_input":"2022-03-28T22:20:15.382378Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#SnakeCLEF 2021\n\n\"Developing a robust system for identifying species of snakes from photographs is an important goal in biodiversity and global health. With over half a million victims of death and disability from venomous snakebite annually, understanding the global distribution of the >3700 species of snakes and differentiating species from images (particularly images of low quality) will significantly improve epidemiology data and treatment outcomes.\"\n\n\"The goals and usage of image-based snake identification are complementary with those of other challenges: classifying snake species in images, predicting the list of species that are the most likely to be observed at a given location, and eventually developing automated tools that can facilitate the integration of changing taxonomies and new discoveries.\"\n\nhttps://www.imageclef.org/SnakeCLEF2021","metadata":{}},{"cell_type":"markdown","source":"![](https://www.imageclef.org/system/files/snake-g71fef2566_1920_crop.jpg)imageclef.org","metadata":{}},{"cell_type":"code","source":"from PIL import Image, ImageDraw\nimport collections\nimport glob \nfrom datetime import datetime as dt\nimport gc\nimport json\n\nimport matplotlib.image as mpimg\n\n%matplotlib inline","metadata":{"execution":{"iopub.status.busy":"2022-03-28T22:22:54.048667Z","iopub.execute_input":"2022-03-28T22:22:54.049591Z","iopub.status.idle":"2022-03-28T22:22:54.078202Z","shell.execute_reply.started":"2022-03-28T22:22:54.049466Z","shell.execute_reply":"2022-03-28T22:22:54.077436Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport plotly.express as px\nimport plotly.graph_objs as go\n\n\nimport plotly\nplotly.offline.init_notebook_mode(connected=True)\n\n#Ignore warnings\nimport warnings\nwarnings.filterwarnings('ignore')","metadata":{"execution":{"iopub.status.busy":"2022-03-28T22:22:59.073620Z","iopub.execute_input":"2022-03-28T22:22:59.074403Z","iopub.status.idle":"2022-03-28T22:23:01.189714Z","shell.execute_reply.started":"2022-03-28T22:22:59.074360Z","shell.execute_reply":"2022-03-28T22:23:01.188565Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train = pd.read_csv('/kaggle/input/snakeclef2022/SnakeCLEF2022-TrainMetadata.csv', delimiter=',')\ntrain.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T22:23:04.561063Z","iopub.execute_input":"2022-03-28T22:23:04.561348Z","iopub.status.idle":"2022-03-28T22:23:05.245561Z","shell.execute_reply.started":"2022-03-28T22:23:04.561318Z","shell.execute_reply":"2022-03-28T22:23:05.244946Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test = pd.read_csv('/kaggle/input/snakeclef2022/SnakeCLEF2022-TestMetadata.csv', delimiter=',')\ntest.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T22:23:10.026062Z","iopub.execute_input":"2022-03-28T22:23:10.026987Z","iopub.status.idle":"2022-03-28T22:23:10.106783Z","shell.execute_reply.started":"2022-03-28T22:23:10.026930Z","shell.execute_reply":"2022-03-28T22:23:10.105964Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Python molurus","metadata":{}},{"cell_type":"code","source":"python = train[(train['binomial_name']=='Python molurus')].reset_index(drop=True)\npython.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T21:27:45.320965Z","iopub.execute_input":"2022-03-28T21:27:45.321327Z","iopub.status.idle":"2022-03-28T21:27:45.359031Z","shell.execute_reply.started":"2022-03-28T21:27:45.321294Z","shell.execute_reply":"2022-03-28T21:27:45.358124Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2 as cv\n\nimg = cv.imread('../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/1992/Python_molurus/150139424.jpg')\nprint( img.shape )","metadata":{"execution":{"iopub.status.busy":"2022-03-29T00:04:01.609122Z","iopub.execute_input":"2022-03-29T00:04:01.609496Z","iopub.status.idle":"2022-03-29T00:04:02.080306Z","shell.execute_reply.started":"2022-03-29T00:04:01.609457Z","shell.execute_reply":"2022-03-29T00:04:02.079215Z"},"_kg_hide-output":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Python sebae","metadata":{}},{"cell_type":"code","source":"python1 = train[(train['binomial_name']=='Python sebae')].reset_index(drop=True)\npython1.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T21:28:38.189475Z","iopub.execute_input":"2022-03-28T21:28:38.189964Z","iopub.status.idle":"2022-03-28T21:28:38.219057Z","shell.execute_reply.started":"2022-03-28T21:28:38.189930Z","shell.execute_reply":"2022-03-28T21:28:38.218219Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from PIL import Image\n\nimage1 = Image.open(\"../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/1996/Python_sebae/85544809.jpg\")\nimage1","metadata":{"execution":{"iopub.status.busy":"2022-03-29T00:05:51.779593Z","iopub.execute_input":"2022-03-29T00:05:51.779961Z","iopub.status.idle":"2022-03-29T00:05:51.811829Z","shell.execute_reply.started":"2022-03-29T00:05:51.779921Z","shell.execute_reply":"2022-03-29T00:05:51.811180Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Above, where is the snake (1996)?","metadata":{}},{"cell_type":"markdown","source":"#Python regius","metadata":{}},{"cell_type":"code","source":"python2 = train[(train['binomial_name']=='Python regius')].reset_index(drop=True)\npython2.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T21:42:45.967205Z","iopub.execute_input":"2022-03-28T21:42:45.967824Z","iopub.status.idle":"2022-03-28T21:42:46.005631Z","shell.execute_reply.started":"2022-03-28T21:42:45.967783Z","shell.execute_reply":"2022-03-28T21:42:46.004344Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"image2 = Image.open(\"../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/2007/Python_regius/22063683.jpeg\")\nimage2","metadata":{"execution":{"iopub.status.busy":"2022-03-29T00:07:55.895377Z","iopub.execute_input":"2022-03-29T00:07:55.895888Z","iopub.status.idle":"2022-03-29T00:07:55.933543Z","shell.execute_reply.started":"2022-03-29T00:07:55.895821Z","shell.execute_reply":"2022-03-29T00:07:55.932950Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#I think that snake above was run over (by a car)","metadata":{}},{"cell_type":"markdown","source":"#Python bivittatus","metadata":{}},{"cell_type":"code","source":"python3 = train[(train['binomial_name']=='Python bivittatus')].reset_index(drop=True)\npython3.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T21:43:22.304883Z","iopub.execute_input":"2022-03-28T21:43:22.305202Z","iopub.status.idle":"2022-03-28T21:43:22.334403Z","shell.execute_reply.started":"2022-03-28T21:43:22.305166Z","shell.execute_reply":"2022-03-28T21:43:22.333826Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"image3 = Image.open(\"../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/2004/Python_bivittatus/50565612.jpg\")\nimage3","metadata":{"execution":{"iopub.status.busy":"2022-03-29T00:11:42.071098Z","iopub.execute_input":"2022-03-29T00:11:42.071543Z","iopub.status.idle":"2022-03-29T00:11:42.106761Z","shell.execute_reply.started":"2022-03-29T00:11:42.071511Z","shell.execute_reply":"2022-03-29T00:11:42.105912Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Python breitensteini","metadata":{}},{"cell_type":"code","source":"python4 = train[(train['binomial_name']=='Python breitensteini')].reset_index(drop=True)\npython4.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T21:44:40.513840Z","iopub.execute_input":"2022-03-28T21:44:40.514732Z","iopub.status.idle":"2022-03-28T21:44:40.554499Z","shell.execute_reply.started":"2022-03-28T21:44:40.514686Z","shell.execute_reply":"2022-03-28T21:44:40.553614Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"image4 = Image.open(\"../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/2009/Python_breitensteini/166183.JPG\")\nimage4","metadata":{"execution":{"iopub.status.busy":"2022-03-29T00:13:11.611581Z","iopub.execute_input":"2022-03-29T00:13:11.611928Z","iopub.status.idle":"2022-03-29T00:13:11.643647Z","shell.execute_reply.started":"2022-03-29T00:13:11.611890Z","shell.execute_reply":"2022-03-29T00:13:11.642852Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Python brongersmai","metadata":{}},{"cell_type":"code","source":"python5 = train[(train['binomial_name']=='Python brongersmai')].reset_index(drop=True)\npython5.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T21:50:08.354001Z","iopub.execute_input":"2022-03-28T21:50:08.354328Z","iopub.status.idle":"2022-03-28T21:50:08.387006Z","shell.execute_reply.started":"2022-03-28T21:50:08.354294Z","shell.execute_reply":"2022-03-28T21:50:08.386295Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"image5 = Image.open(\"../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/2007/Python_brongersmai/50564958.jpg\")\nimage5","metadata":{"execution":{"iopub.status.busy":"2022-03-29T00:14:53.870300Z","iopub.execute_input":"2022-03-29T00:14:53.871096Z","iopub.status.idle":"2022-03-29T00:14:53.905279Z","shell.execute_reply.started":"2022-03-29T00:14:53.871041Z","shell.execute_reply":"2022-03-29T00:14:53.904393Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Python natalensis","metadata":{}},{"cell_type":"code","source":"python6 = train[(train['binomial_name']=='Python natalensis')].reset_index(drop=True)\npython6.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:46:39.136238Z","iopub.execute_input":"2022-03-28T23:46:39.136520Z","iopub.status.idle":"2022-03-28T23:46:39.164765Z","shell.execute_reply.started":"2022-03-28T23:46:39.136490Z","shell.execute_reply":"2022-03-28T23:46:39.164216Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"image6 = Image.open(\"../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/1991/Python_natalensis/5483231.jpg\")\nimage6","metadata":{"execution":{"iopub.status.busy":"2022-03-29T00:16:16.921776Z","iopub.execute_input":"2022-03-29T00:16:16.922113Z","iopub.status.idle":"2022-03-29T00:16:16.957244Z","shell.execute_reply.started":"2022-03-29T00:16:16.922078Z","shell.execute_reply":"2022-03-29T00:16:16.956442Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Boiruna sertaneja\n\nCommon Names Portuguese: Cobra-de-Leite, Cobra-Preta, Limpa-Mato, Muçurana, Mussurana \n\nSynonym Boiruna sertaneja ZAHER 1996\n\nBoiruna sertaneja — WALLACH et al. 2014: 108\n\nBoiruna sertaneja — NOGUEIRA et al. 2019 \n\nDistribution: Brazil (Bahia, Ceará, Maranhao, Minas Gerais, Paraíba, Pernambuco, Rio Grande do Norte)\n\nType locality: Bareiras, Bahia, Brazil. \n\nhttps://reptile-database.reptarium.cz/species?genus=Boiruna&species=sertaneja","metadata":{}},{"cell_type":"code","source":"sertaneja = train[(train['binomial_name']=='Boiruna sertaneja')].reset_index(drop=True)\nsertaneja.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:08:13.096466Z","iopub.execute_input":"2022-03-28T23:08:13.096798Z","iopub.status.idle":"2022-03-28T23:08:13.126781Z","shell.execute_reply.started":"2022-03-28T23:08:13.096762Z","shell.execute_reply":"2022-03-28T23:08:13.125935Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Boiruna sertaneja\n\nSynonyms: Cobra-de-Leite, Cobra-Preta, Limpa-Mato, Muçurana, Mussurana","metadata":{}},{"cell_type":"code","source":"from PIL import Image\n\nimage = Image.open(\"../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/2021/Boiruna_sertaneja/135320664.jpeg\")\nimage","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:12:13.160159Z","iopub.execute_input":"2022-03-28T23:12:13.160644Z","iopub.status.idle":"2022-03-28T23:12:13.195660Z","shell.execute_reply.started":"2022-03-28T23:12:13.160594Z","shell.execute_reply":"2022-03-28T23:12:13.194988Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Not all images are from 2020 as we can see above. We have 1991, 2021, 2004, 2005 and so on.","metadata":{}},{"cell_type":"code","source":"#Code by Nayu. T.S.  https://www.kaggle.com/code/nayuts/iwildcam-2020-overviewing-for-start\n\ntrain_jpg = glob.glob('../input/snakeclef2022/SnakeCLEF2022-small_size/SnakeCLEF2022-small_size/*/*/*.jpg')\ntest_jpg = glob.glob('../input/snakeclef2022/SnakeCLEF2022-test_images/SnakeCLEF2022-large_size/*.jpg')\n\nprint(\"number of train jpg data:\", len(train_jpg))\nprint(\"number of test jpg data:\", len(test_jpg))","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:58:35.532352Z","iopub.execute_input":"2022-03-28T23:58:35.532669Z","iopub.status.idle":"2022-03-29T00:00:11.660056Z","shell.execute_reply.started":"2022-03-28T23:58:35.532632Z","shell.execute_reply":"2022-03-29T00:00:11.659188Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Train data","metadata":{}},{"cell_type":"code","source":"#Code by Nayu. T.S.  https://www.kaggle.com/code/nayuts/iwildcam-2020-overviewing-for-start\n\nfig = plt.figure(figsize=(25, 16))\nfor i,im_path in enumerate(train_jpg[:16]):\n    ax = fig.add_subplot(4, 4, i+1, xticks=[], yticks=[])\n    im = Image.open(im_path)\n    im = im.resize((480,270))\n    plt.imshow(im)","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:06:44.743631Z","iopub.execute_input":"2022-03-28T23:06:44.743921Z","iopub.status.idle":"2022-03-28T23:06:46.725528Z","shell.execute_reply.started":"2022-03-28T23:06:44.743891Z","shell.execute_reply":"2022-03-28T23:06:46.724170Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Nayu. T.S.  https://www.kaggle.com/code/nayuts/iwildcam-2020-overviewing-for-start\n\nfig = plt.figure(figsize=(25, 16))\nfor i,im_path in enumerate(train_jpg[16:32]):\n    ax = fig.add_subplot(4, 4, i+1, xticks=[], yticks=[])\n    im = Image.open(im_path)\n    im = im.resize((480,270))\n    plt.imshow(im)","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:06:53.356974Z","iopub.execute_input":"2022-03-28T23:06:53.357563Z","iopub.status.idle":"2022-03-28T23:06:55.237449Z","shell.execute_reply.started":"2022-03-28T23:06:53.357505Z","shell.execute_reply":"2022-03-28T23:06:55.236774Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Test data","metadata":{}},{"cell_type":"code","source":"#Code by Nayu. T.S.  https://www.kaggle.com/code/nayuts/iwildcam-2020-overviewing-for-start\n\nfig = plt.figure(figsize=(25, 16))\nfor i,im_path in enumerate(test_jpg[:16]):\n    ax = fig.add_subplot(4, 4, i+1, xticks=[], yticks=[])\n    im = Image.open(im_path)\n    im = im.resize((480,270))\n    plt.imshow(im)","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:07:02.345475Z","iopub.execute_input":"2022-03-28T23:07:02.345742Z","iopub.status.idle":"2022-03-28T23:07:04.602509Z","shell.execute_reply.started":"2022-03-28T23:07:02.345713Z","shell.execute_reply":"2022-03-28T23:07:04.601361Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Guglielmo Camporese https://www.kaggle.com/code/guglielmocamporese/macro-f1-score-keras\n\nimport tensorflow as tf\nimport keras.backend as K\n\ndef f1(y_true, y_pred):\n    y_pred = K.round(y_pred)\n    tp = K.sum(K.cast(y_true*y_pred, 'float'), axis=0)\n    # tn = K.sum(K.cast((1-y_true)*(1-y_pred), 'float'), axis=0)\n    fp = K.sum(K.cast((1-y_true)*y_pred, 'float'), axis=0)\n    fn = K.sum(K.cast(y_true*(1-y_pred), 'float'), axis=0)\n\n    p = tp / (tp + fp + K.epsilon())\n    r = tp / (tp + fn + K.epsilon())\n\n    f1 = 2*p*r / (p+r+K.epsilon())\n    #f1 = tf.where(tf.is_nan(f1), tf.zeros_like(f1), f1)   \n    f1 = tf.where(tf.math.is_nan(f1), tf.zeros_like(f1), f1)\n    return K.mean(f1)","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:01:43.468691Z","iopub.execute_input":"2022-03-28T23:01:43.469473Z","iopub.status.idle":"2022-03-28T23:01:43.477515Z","shell.execute_reply.started":"2022-03-28T23:01:43.469427Z","shell.execute_reply":"2022-03-28T23:01:43.476620Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Macro F1 Score\n\n\"Macro F1-score (short for macro-averaged F1 score) is used to assess the quality of problems with multiple binary labels or multiple classes.\"\n\n\"If you are looking to select a model based on a balance between precision and recall, don’t miss out on assessing your F1-scores.\"\n\n\"Macro F1-score = 1 is the best value, and the worst value is 0.\"\n\nAll classes treated equally\n\n\"Macro F1-score will give the same importance to each label/class. It will be low for models that only perform well on the common classes while performing poorly on the rare classes.\"\n\n\nDefinition\n\n\"The Macro F1-score is defined as the mean of class-wise/label-wise F1-scores:\n\n\\[\\begin{array}{rcl} \\text{Macro F1-score} & = & \\frac{1}{N} \\sum_{i=0}^{N} {\\text{F1-score}_i} \\\\ \\end{array}\\] where i is the class/label index and N the number of classes/labels.\"\n\nhttps://peltarion.com/knowledge-center/documentation/evaluation-view/classification-loss-metrics/macro-f1-score","metadata":{}},{"cell_type":"code","source":"#Code by Guglielmo Camporese https://www.kaggle.com/code/guglielmocamporese/macro-f1-score-keras\n\nimport numpy as np\nfrom sklearn.metrics import f1_score\n\n# Samples\ny_true = np.array([[1,1,0,0,1], [1,0,1,1,0], [0,1,1,0,0]])\ny_pred = np.array([[0,1,1,1,1], [1,0,0,1,1], [1,0,1,0,0]])\n\nprint('Shape y_true:', y_true.shape)\nprint('Shape y_pred:', y_pred.shape)\n\n# Results\nprint('sklearn Macro-F1-Score:', f1_score(y_true, y_pred, average='macro'))\nprint('Custom Macro-F1-Score:', K.eval(f1(y_true, y_pred)))","metadata":{"execution":{"iopub.status.busy":"2022-03-28T23:01:49.547466Z","iopub.execute_input":"2022-03-28T23:01:49.547984Z","iopub.status.idle":"2022-03-28T23:01:49.590318Z","shell.execute_reply.started":"2022-03-28T23:01:49.547951Z","shell.execute_reply":"2022-03-28T23:01:49.589060Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Acknowldgements:\n\n\nGuglielmo Camporese https://www.kaggle.com/code/guglielmocamporese/macro-f1-score-keras\n\nNayu. T.S.  https://www.kaggle.com/code/nayuts/iwildcam-2020-overviewing-for-start\n","metadata":{}}]}