From 769aa172296eb121a1a1dd87be181dbce5caedef Mon Sep 17 00:00:00 2001 From: Thibault Tabarin Date: Thu, 14 Jul 2022 21:03:57 -0400 Subject: [PATCH 1/4] new trait measurement --- .../Morphology_dev-checkpoint.ipynb | 1102 ++++++++++++++++- Scripts/Morphology_dev.ipynb | 472 ++++++- Scripts/Morphology_main.py | 5 +- Scripts/Traits_class.py | 347 ++++-- 4 files changed, 1709 insertions(+), 217 deletions(-) diff --git a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb index 87e6a5a..8f7544c 100644 --- a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb +++ b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 42, "id": "602dc370", "metadata": {}, "outputs": [ @@ -31,7 +31,7 @@ "" ] }, - "execution_count": 35, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -42,6 +42,7 @@ "import json, sys\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", + "from skimage.measure import label, regionprops\n", "from PIL import Image, ImageDraw, ImageFont\n", "from IPython.display import Image\n", "import importlib\n", @@ -51,19 +52,20 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 43, "id": "e620246b", "metadata": {}, "outputs": [], "source": [ "# load the test image, you can add more test image if you have bug related to specific images.\n", "segmented_file = '../Test_Data/INHS_FISH_000742_segmented.png'\n", + "#segmented_file = '../Test_Data/INHS_FISH_85194_segmented.png'\n", "metadata_file = '../Test_Data/INHS_FISH_000742.json'" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 44, "id": "2289de98", "metadata": {}, "outputs": [], @@ -72,7 +74,8 @@ "img_seg = tc.segmented_image(segmented_file)\n", "\n", "# oupput the variables create at initialization time\n", - "measurement = img_seg.measurement\n", + "measure_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", + "measure_lm = img_seg.measurement_with_lm # measurement using bbox\n", "landmark = img_seg.landmark\n", "presence_matrix = img_seg.presence_matrix\n", "img_landmark = img_seg.visualize_landmark()" @@ -93,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 38, "id": "ae9eb407", "metadata": {}, "outputs": [ @@ -113,49 +116,110 @@ " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" ] }, - "execution_count": 4, + "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# presence dictionnary\n", - "presence_matrix" + "presence_matrix\n" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 45, "id": "b24d03d1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'SL': 586.0034129593445,\n", + "{'SL_bbox': 587,\n", + " 'HL_bbox': 152,\n", + " 'ED_bbox': 31,\n", + " 'HD_eye': 100,\n", + " 'pOD_bbox': 30,\n", + " 'fish_angle': 2.0124973591623814}" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# measurement dictionnary with measurement using bbox\n", + "measure_bbox" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "e5d892d3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL_lm': 586.0034129593445,\n", " 'EA': 922,\n", - " 'HAt': 8437.999999999995,\n", + " 'HAt_lm': 8437.999999999995,\n", " 'HAp': 16034,\n", - " 'HCL': 'WIP',\n", " 'ED': 34.262616074167774,\n", - " 'HL': 151.64761785138597,\n", - " 'HD': 158.3161394173064,\n", - " 'pOD': 32.31098884280702}" + " 'HL_lm': 151.64761785138597,\n", + " 'HD_lm': 158.3161394173064,\n", + " 'pOD_lm': 32.31098884280702}" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# measurement dictionnary with measurement using landmarks\n", + "measure_lm" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "fe50c813", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL_bbox': 587,\n", + " 'HL_bbox': 152,\n", + " 'ED_bbox': 31,\n", + " 'HD_eye': 100,\n", + " 'pOD_bbox': 30,\n", + " 'fish_angle': 2.0124973591623814,\n", + " 'SL_lm': 586.0034129593445,\n", + " 'EA': 922,\n", + " 'HAt_lm': 8437.999999999995,\n", + " 'HAp': 16034,\n", + " 'ED': 34.262616074167774,\n", + " 'HL_lm': 151.64761785138597,\n", + " 'HD_lm': 158.3161394173064,\n", + " 'pOD_lm': 32.31098884280702}" ] }, - "execution_count": 5, + "execution_count": 54, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# measurement dictionnary\n", + "measurement = {**measure_bbox, **measure_lm}\n", "measurement" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "id": "ffda5440", "metadata": {}, "outputs": [ @@ -176,10 +240,13 @@ " '12': (162, 187),\n", " '13': (224, 138),\n", " '14': (136, 66),\n", - " '15': (134, 96)}" + " '15': (134, 96),\n", + " '16': (115, 81),\n", + " '17': (153, 81),\n", + " '18': (135, 81)}" ] }, - "execution_count": 6, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -191,18 +258,18 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 15, "id": "8b7d1b1a", "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAY90lEQVR4nO3dbW6jyrqA0Tooo7gjPIOILGR5EFt7gGcUkXV/4KYJxhgwUF9rqdXqdBzHSbvtJ28VOAQAAAAAAAAAAAAAAEjEf2LfAKAW99n3NifdCoAzCCxgT/MVNU9jAcUQWMB2n+TUJI0FlEFgAUvtnlOTNBZQgK/YNwBI2jlRBVAYEyyoXYIJZYgF5E5gQUUSbKlXNBaQNYEFMbVtO/PmhzLKqUkaC8iXwII4Zlrqk8zKPaq2kWJAagQWnG1hPy3PrDqjaiHtBUQhsOBUq6ZTkx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6yO0uIXogq4hMBipzQDq6e0GJNWwIUEFvsl3lhBZiGqgEgEFvulH1gdmVUg5QSkTWDxllwaK8is9GkmoCACi3dpLDa430/85E1z4icH2EJg8a6MAitorAs8HuGZwE1CbAFRCSwOoLEqlUhLvaKxgHgEFsfIqLGqCKzRfqZpBv0aHymX03oaC4hEYHGYXBqrtMA6dVdT7gQWEMmf2AdAOZrQ5NJY2RNVAGkTWBxJY72j/fPj/2P7+TlzIWkFkAOBxcE01g6jtBq+8zuzpNVW1geBeAQWx2tCE/LZkhXXbFpNL9Deyto3dgF1BUTlPoizNG5dv/m1rr4vaXy1UtN8/QKIygSLE1ku5HRaCkiS0zRwutQaK5HTNAzHV23b9r/P/uHrTQuFHVEFJM/9FKezVrigbdtxRQ1ia/ShGvVLfsNfAMlzV8UVNNZIP76aBtbStYrZiTWbTVoKKIg9WFzEUwvrpZOA+ggsLtWPspRW4UQVUDd3gsTRLwJd/3XHL4TMmyztAUx4FiEJuWCs9Z10Hx9nf60Fwz1Y4w8NdmXNfPS8JxKqIoDjCCxSdFJpzQzM4mXW+rOMfl+l763n4vdHKgHEZg8WKbpuR/x0ufCa5Ho8wjunYJBQAGkzwSInW5Mr8dNDbDrNlXNiAWTEBIucJB5MANDxcAXRbDjFqPEVQFYsEUJ8C/0krQByJLAgFbMvSggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OP/SIFCPeO9YoQAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, - "execution_count": 7, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -217,7 +284,7 @@ "id": "100fd501", "metadata": {}, "source": [ - "## 3- Explore the class works\n", + "## 3- Explore how the class works\n", "\n", " 1. Create the object Masks extraction : \n", " During the creattion of the object everything will happened automatically. We will detail the different step that has happened under the hood. The image is imported from the input file, the image is then convert in to 11 masks corresponding to each traits then, we clean the masks and extract morphological info such as area, centroid, landmarks... then we calculate the different measurements we want.\n", @@ -243,7 +310,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 38, "id": "f9ce0bf1", "metadata": {}, "outputs": [ @@ -251,7 +318,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "This is the list of the trait ['dorsal_fin', 'adipos_fin', 'caudal_fin', 'anal_fin', 'pelvic_fin', 'pectoral_fin', 'head', 'eye', 'caudal_fin_ray', 'alt_fin_ray', 'trunk']\n" + "This is the list of the trait : ['dorsal_fin', 'adipos_fin', 'caudal_fin', 'anal_fin', 'pelvic_fin', 'pectoral_fin', 'head', 'eye', 'caudal_fin_ray', 'alt_fin_ray', 'trunk']\n" ] } ], @@ -265,23 +332,23 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 41, "id": "fccc32b4", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 17, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" }, { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUFklEQVR4nO3dfXRU9Z3H8fd3ZkICieFBBQMJAp6IAhVE5EF3WytSkW2F1q3iI1q7VMWqtbsW2q2ntmuP1dbSs2qVaguWVhYfWtBaRWk9bUVUVFQeDM+V8KjIMxJI8t0/cjlNJZBJMpN75+bzOidn7vzmztxPePjk5jd37jV3R0RE4iURdgAREck8lbuISAyp3EVEYkjlLiISQyp3EZEYUrmLiMRQ1srdzEabWYWZrTKzydnajoiIHM6ycZy7mSWBFcAooBJ4HbjU3ZdlfGMiInKYbO25DwVWufsadz8AzALGZmlbIiLyCdkq9x7A+nr3K4MxERFpBaksva41MPZP8z9mNhGYCJAkeUYHirMURUQknnaz/UN3P76hx7JV7pVAWb37pcD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r3snLPJX5elbw6jgKW1Hk8HplucqTcnl3sGkOi7nwhk1JUVWAqMsiDvIuAqO+cEooENwEV2zEnNzKWpwOha5W7HnHWVu61yAu2AbHz78+ya85RsPwJW2T1nUz+sHpYJhgt72PaiJCLSG7iAmq1i2+UMoou8zAAeB7y1ltkxpwH+IyLrRWSKTXP2AfYDr/qGuV4WkRgb5qxtMvCO776dczaJ1eXeqAt72JSl2UUkFvgAeNgYU1LfqnUsa5GcJgAXefE3EbkWKDbGrG/sp9SxrKW+75cYYy4ErgYeEJFL61nXqpxh1AxtzjbGXEDNtCL17Uuz+ucoArgOeK+hVetYZuuusrrcG3VhD4s166IkgSAi4dQU+1vGmA/tmvM448eLvATAJcB1IrIXmA+MFpE3bZgTY0y+77YY+IiaaxPbLWcekOf7Kw3gfWrK3m45j7sa2GCMKfI9tmvOJrO63L8BUkQk2fcbdDI1F/uwE1tdlEREBHgF2GGMed7GOYPiIi/GmOnGmO7GmN7U/P/7whhzm91yikiMiLQ9fp+aceJtdstpjCkEckWkv2/RFdRc28FWOWu5hRNDMsfz2DFn01k96A+Mo+aIjyzgNxZneQcoAFzU/Ka+C4inZmfbbt9tx1rr/8aXOwO4uoUyfp+aPwe3AJt8H+NsmHMwsNGXcxvwlG+5rXKekvkyTuxQtVVOasayN/s+0o//rNgtp+99hwBpvu/9QiDOpjmjgYNA+1rLbJfzbD/0DFWllApBVg/LKKWUCgAtd6WUCkFa7kopFYK03JVSKgRpuSulVAjScldKqRCk5a6UUiFIy10ppULQ/wPc4J223O+wUQAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] @@ -294,7 +361,7 @@ ], "source": [ "# Visualize the mask for a specific trait\n", - "trait_name = 'head'\n", + "trait_name = 'trunk'\n", "plt.imshow(masks_dict[trait_name])" ] }, @@ -646,9 +713,91 @@ "This is where we make a mess!!!" ] }, + { + "cell_type": "markdown", + "id": "6ac59530", + "metadata": {}, + "source": [ + "### Develop a tool to visualize the box around biggest blob for one specific trait" + ] + }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 34, + "id": "829041db", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAWE0lEQVR4nO3d3VLjOtaAYbWrL3YuItUHVC5iai42zEG6IZgkJI4sLS09T+2D72dvMCDbL8siKQUAAAAAAAAAAAAAAIL41fsAgFmc7v5/l0ZHAdCCwAJqul9R92ksIA2BBWz3Sk5dpbGAHAQW8KjqOXWVxgIS+N37AIDQ2kQVQDImWDC7gAlliAWMTmDBRAK21C0aCxiawIK0BsqpqzQWMC6BBamMHlXbSDEgGoEFw5szqh6kvYAuBBYMRk5VJL+AnQgsGICoakNvAbUILAhNWnWhtIAXCSyIS111p7SAbQQWhKOrIpNcwCMEFoQgqkYktoBbBBb0p66GJrOA7wRWBu+9DwAAN1Qu/e59ANThxO7pcNj7M5yOx70/BXUZa83GL7qsuC9n8O4Hubf9E+pxYms4YmsGrsOsWA8ZOLEri5RTz5JfkSmtxFyHWbEeMnBiv2rkonqE6gpIbCXjOsyK9ZCBE/sh2SvqWaorCKWVg+swK9ZDBk7sNS21wfHo1SJ60VgJuA6zYj1k4MQuRVRVZr7VmMYaneswK9ZDBtOd2FqqOb3Vhswa13TXYX5iPWSQ+cTWUiHprf1orEFlvg6zifWQQYYTW0gNTnJVp7TGkuE6TFXWQwajntiiKiOlVZfMGsWo12F2Yz1kMNKJLaqmobQqklnxjXQdpgnrIYPoJ7aomp7Yep3GCi76dZjmrIcM4p7Y0oqvlNaLZFZYca/DdGI9ZBDuxNZV/Mjrmm6lsWIKdx2mN+shgxAntqhiM7H1PJkVTYjrMJFYDxn0PLF1FbXIrOfJrDgEFivWQwZ9TmxpxR6Ox1KK0nqcxgpCYLFiPWTQ+sSWVrRhpvUwmdWdwGLFesig3YktrehCaT1GZnUksFixHjJocWJLKyJQWg+QWV0ILFashwz2PbGlFQEprbs0VnsCixXrIYO9TmxpRXxK6zaZ1ZLAYsV6yK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DwAAN1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAV/wf5dJBt3P22cQAAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Develop a tool to visualize the box around biggest blob for one specific trait\n", + "# Draw a bbox \n", + "# importing image object from PIL\n", + "from PIL import Image, ImageDraw\n", + "\n", + "mask_dict = img_seg.mask\n", + "trunk_prop = img_seg.clean_trait_region(mask_dict['trunk'])\n", + "trunk_bbox = trunk_prop.bbox\n", + "\n", + "top, left, bottom, right = trunk_bbox\n", + "wide = bottom-top\n", + "height = right-left\n", + "shape = [(left, top), (right,bottom)]\n", + " \n", + "# creating new Image object\n", + "img_arr = img_seg.img_arr\n", + "img = Image.fromarray(img_arr)\n", + "img1 = ImageDraw.Draw(img)\n", + " \n", + "# create rectangle image\n", + "img1 = ImageDraw.Draw(img) \n", + "img1.rectangle(shape, outline =\"red\")\n", + "img" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "178725e6", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAATrUlEQVR4nO3dXXLbOhKAUYSVxc4iXHlwaRFTs1hmHuTIf5JMUSDQDZxTebu5FiUx5OcmRJUCAAAAAAAAAAAAAABB/Oq9AcAs1rv/dWm0FQAtCCygpvsVdZ/GAoYhsID9nsmpqzQWMAaBBWxVPaeu0ljAAH733gAgtDZRBTAYEyyYXcCEMsQCshNYMJGALXWLxgJSE1gwrEQ5dZXGAvISWDCU7FG1jxQDohFYkN6cUbWR9gK6EFiQjJyqSH4BBxFYkICoakNvAbUILAhNWnWhtIAnCSyIS111p7SAfQQWhKOrIpNcwBYCC0IQVRmJLeAWgQX9qavUZBbwncCChl5e7v/39XRqsyEcQWkBFwILnvZ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rGYh51bwsMQbUMr4hddSGwJvNQZjUJrKKxGJuuYl7HnUFCp9WZwJrP9sY6nUopbRqryCwGo6vgTd2TSIK0OhNYs9qYWRoLHiWt4Ac/nlPSVNQdAmt690vr36miWWMVmUVe0gr4Z4RI5CnbTglLw13FN+qQz+mkroCPTLD44Ps06/M5wxwL3sgp4C6BxQNaBtaZzCIWXQVsI7B4QPvAOpNZdKargAcJLB7Tq7GKzKI9XQXsJbB4TMfAOpNZHE5XAU8TWDyse2MVmcURdBVQj8BijwiNdaa0eJauAg4gsNgjTmCdySz2kFbAYQQWO0VrrDOlxQ9EFdCEwGKnmIF1obT4SloBDQks9gveWEVmIaqATgQW+8UPrDOZNSDlBMQmsHhKlsYqMis+zQQMRGDxLI3FA15fD/zhy3LgDwd4hMDiWYkCq2isBk6nsgbYJcQW0JXAogKNNakgLXWLxgL6EVjUkaixpgisL+uZvmfQj/ERuZy201hAJwKLarI01miBdeiqpuwEFtDJ794bwDiWsmRprPREFUBsAouaNNbhpBVABgKLyjTWUaTVo1wfBPoRWNS3lKXkWZIVmqjaTV0BXQksjmKU9Sx1tYOuAmIQWBxIY+2nrjZSVEBIAotjaaw91NV9ogoIT2BxOI3FfloKyElg0YLG4hPZBIxOYNGIjxbOS04B8xFYNHXOrKK07hhjAZaoAubmuwjprHFpvRXey0vLB93q8g3Nub5oWUsBfCOwCKRBbF1GaOEa61JXH7UsLZ0EUI/AIqKDSuu9ri4iZNbVtLrvfnhJJYDeBBZxVc+sK4H1XZvk2hFVAOQhsMjk0eTaVFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPT2f6qo0TfqsKwRAAAAAElFTkSuQmCC\n", + "text/plain": [ + "" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.visualize_a_bbox('head')" + ] + }, + { + "cell_type": "markdown", + "id": "855a8d1a", + "metadata": {}, + "source": [ + "### Test/explore methods to get the trunk upper contour length from landmarks #2 to #5" + ] + }, + { + "cell_type": "code", + "execution_count": 18, "id": "add5f243", "metadata": {}, "outputs": [ @@ -658,13 +807,13 @@ "82724" ] }, - "execution_count": 25, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" }, { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAADdCAYAAABAMDLCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAjm0lEQVR4nO3deXxU1f3/8ddnJiEhJCJhM7LIIrsiUkRApbjT0srXtu4IrrgrVu1Pba1+W7Xu4lJABBHr/lXrvoALKhhEEJAdAoQ1gEBYkpBt5vz+yIABQhJCJneW9/PxyGNmzj33zifH9sPJueeeY845REQktvi8DkBERGqfkruISAxSchcRiUFK7iIiMUjJXUQkBim5i4jEoLAldzMbaGZLzCzLzO4M1/eIiMj+LBzz3M3MDywFzgTWAj8AFznnFtb6l4mIyH7C1XPvDWQ551Y454qB14HBYfouERHZR0KYrtsCWFPu81rgxANVrmdJLpkGYQpFaiLYqAHOKj5mQYdvW0HdBiQi+9lJ7mbnXNOKjoUruVeUFvYa/zGz4cBwgGRSONFOD1MoUl7WE32w5kWVVzLHD6eMopE/pcLDi4oL+P202/crb/JxEg1fmV4bYYpINXzu3lp1oGPhSu5rgVblPrcE1pev4JwbC4wFOMzStcBNDVlSEsGencsVwIAx0zkupeL/5qcmzyDFV68aV644sQN0qZdC1qkT9itffnIei/+3CQB3PncFGVPzKzw/YUUOgY2bqhGDiNRUuG6oJlB2Q/V0YB1lN1Qvds4tqKj+YZbu1HOvvq1X9GV7h7L3JY0CrDxnrLcBHaSTfvoDP89uvldZu7d34mbO9ygikej0uXtrlnOuV0XHwtJzd86VmtmNwGeAH3jhQIldyvibNgVfudGstAY0+c8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JrO63L8BUkQk2fcbdDI1F/uwE1tdlEREBHgF2GGMed7GOYPiIi/GmOnGmO7GmN7U/P/7whhzm91yikiMiLQ9fp+aceJtdstpjCkEckWkv2/RFdRc28FWOWu5hRNDMsfz2DFn01k96A+Mo+aIjyzgNxZneQcoAFzU/Ka+C4inZmfbbt9tx1rr/8aXOwO4uoUyfp+aPwe3AJt8H+NsmHMwsNGXcxvwlG+5rXKekvkyTuxQtVVOasayN/s+0o//rNgtp+99hwBpvu/9QiDOpjmjgYNA+1rLbJfzbD/0DFWllApBVg/LKKWUCgAtd6WUCkFa7kopFYK03JVSKgRpuSulVAjScldKqRCk5a6UUiFIy10ppULQ/wPc4J223O+wUQAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] @@ -676,12 +825,11 @@ } ], "source": [ - "trunk_pro = img_seg.clean_trait_region(masks['trunk'])\n", "trunk_mask = trunk_pro.image\n", "pad_mask =np.pad(trunk_mask, ((1, 1), (1,1)), 'constant', constant_values=((0, 0),(0,0)))\n", "list_contour = ski.measure.find_contours(trunk_mask)\n", "erosion_trunk = ski.morphology.erosion(pad_mask)\n", - "plt.imshow(pad_mask)\n", + "#plt.imshow(pad_mask)\n", "np.all(pad_mask == erosion_trunk)\n", "sum(sum(pad_mask))" ] @@ -908,6 +1056,14 @@ "plt.imshow(caudal_fin)" ] }, + { + "cell_type": "markdown", + "id": "f01b431c", + "metadata": {}, + "source": [ + "### Develop a tool to get landmark #5 and #7 on the caudal fin" + ] + }, { "cell_type": "code", "execution_count": 13, @@ -958,7 +1114,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 49, "id": "ed0dc8c6", "metadata": {}, "outputs": [], @@ -988,17 +1144,28 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 56, "id": "04909223", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "lm_5, lm_7 = landmark_5_7(img_seg)\n" + "lm_5, lm_7 = landmark_5_7(img_seg)" ] }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 57, "id": "f519df18", "metadata": {}, "outputs": [ @@ -1009,34 +1176,859 @@ "" ] }, - "execution_count": 54, + "execution_count": 57, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "img_arr = img_seg.img_arr\n", + "# Function\n", + "from PIL import Image\n", "def visualize_landmark(img_arr,coord):\n", - " text = '5' \n", + " '''function to visualize one landmark define by coord''' \n", + " \n", + " text = '5' \n", " \n", - " img = Image.fromarray(img_arr)\n", - " img1 = ImageDraw.Draw(img)\n", + " img = Image.fromarray(img_arr)\n", + " img1 = ImageDraw.Draw(img)\n", " \n", - " #\n", - " #fnt = ImageFont.truetype(\"Pillow/Tests/fonts/FreeMono.ttf\", 15)\n", - " fnt = ImageFont.load_default()\n", + " #\n", + " #fnt = ImageFont.truetype(\"Pillow/Tests/fonts/FreeMono.ttf\", 15)\n", + " fnt = ImageFont.load_default()\n", "\n", - " x,y = coord\n", - " xy = [(y-9,x-9),(y+9,x+9)]\n", - " img1.ellipse(xy, fill='gray', outline=None, width=1)\n", + " x,y = coord\n", + " xy = [(y-9,x-9),(y+9,x+9)]\n", + " img1.ellipse(xy, fill='gray', outline=None, width=1)\n", " \n", - " img1.text((y-6, x-6), text, font=fnt, fill='black')\n", - " # Display the image created\n", + " img1.text((y-6, x-6), text, font=fnt, fill='black')\n", + " # Display the image created\n", " \n", - " return img\n", + " return img\n", + " \n", " \n", + "img_arr = img_seg.img_arr \n", "visualize_landmark(img_arr,lm_7)" ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "4214430e", + "metadata": {}, + "outputs": [], + "source": [ + "# Example with other image with 2 pevilc fins\n", + "# load the test image, you can add more test image if you have bug related to specific images.\n", + "segmented_file = '../Test_Data/INHS_FISH_85194_segmented.png'\n", + "#segmented_file = '../Test_Data/INHS_FISH_000742_segmented.png'\n", + "img_seg_2 = tc.segmented_image(segmented_file)\n", + "masks_dict_2 = img_seg_2.mask\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "ba85ee1d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL': 627.5388434192739,\n", + " 'EA': 1939,\n", + " 'HAt': 5286.499999999997,\n", + " 'HAp': 11667,\n", + " 'HCL': 'WIP',\n", + " 'ED': 49.68713593317168,\n", + " 'HL': 158.61904047118682,\n", + " 'HD': 114.23221962301179,\n", + " 'pOD': 45.39823785126467,\n", + " 'BL': 692,\n", + " 'BD': 139}" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.measurement" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "id": "76137eee", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 99, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAADFCAYAAACvtbI0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAttklEQVR4nO2dd3yc1bG/n1G3ZclyFe4FdxtcsE3HBoMxHRIghiRACpBLCwm5AcL9XUhILgESkpDCDSGmJbQQkgAhBgz2pYTgFopt3DAG94Ituahr5/fHvEJrWWWlrVrN48/57Ltnz/u+45X03bNz5syIquI4juOkFxnJNsBxHMeJPS7ujuM4aYiLu+M4Thri4u44jpOGuLg7juOkIS7ujuM4aUjcxF1EZonIKhFZKyI3xes+juM4zsFIPOLcRSQTWA2cAmwEFgEXqeqKmN/McRzHOYh4zdynAmtVdZ2qVgFPAOfE6V6O4zhOA7LidN1+wIaw5xuBI5saLCK+TdZxHKf17FTVXo29EC9xl0b6DhBwEbkCuCJO93ccx+kIfNzUC/ES943AgLDn/YHN4QNU9X7gfvCZu+M4TqyJl899ET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Dri4O47jpCEu7o7jOGmIi7vjOE4a4uLuOI6Thri4O47jpCEu7o7jOGmIi7vjOE4a8v8BZM+g2T2sit8AAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(img_seg_2.img_arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "17a0181a", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAGECAIAAABBANPuAAAVLUlEQVR4nO3dXW7jOraAUcY4Y23cQQT1UMggGj1Y5z6ojkuxZVs/FLlJroXz0EBXpSzFlj5vynJKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKV81H4AAPldt/zhy1mPAhiXwALas6mfNhFbQBYCCwjkvHLaSmkBRziGAABkZoIFFBJnOrWJt6HADgILyCRrQF0jdU2kxwK0QWCx4Lv2AwDgJE78ZfxT+wEQlFdgwz4/i/5zX19//3fuVcBQc6ybkA8KVvH+uRinURZ8e2YcUbhv4riVVo7MiplWm7S/BXTI4b0YRwAAgMyELAu8xXlj2BnVStMoa9ccq4PB1QtdbxxtcHgvxn5mgVfgD3Jqt/nlWSmlZu/UcB7JRWEO78XYzywY9xWopU7yUFpzqmtOcnGqcQ/vxdnPLOjzFSiegngZW0lv/aS3yKvPw3tIXrwAAJkJWRY0/xbHsKpFLth6xxtijmv+8N4O+5kF7b0CFVWv/q0usXVHbLFPe4f3ZtnPLGjjFSiqRvNzxCW55vQWK7VxeO+C/cyCiK9AOcWc2HpJb/FMxMN7p+xnFlR+BWopNpnFltK6o7S4I7CK8eoDAMhMyLKg6Fsc8yoyMs16wptpJiZYxdjPLDj6CtRMBKG3fpJZCKxi7GcWrH0FCima474PMmtsAqsY+5kFr16BooqefH0NW1oya0wCqxj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CHp2xUPjixwa84D157wHAEQKLZ7Jk1l2mLP7MWikjswA4i/MHz2R5btxFzOPPrPgMXPNPWy4EYA8TLF44Y4gVzcptDL4VAMTitAEAkJnA4oVLjmdIH6tsfWwFAIUILN7SWJM+tgKAEgQWa2isybWXDQHgXAKLlTxVbjQWAG84awIAZOY2DWx1ZH4TLeh72hYAAhFY7NB0l5z0RUAA8JfAYp/dmRL5i3F20FgALBBY7NZQY519WbrMAuAHgcVBO9qlSo4U+OifzALgD6cEAIDMTLDIYut8yBALgJ4JLHLZlC8RQuS83oqwdQDUJLDIaH2yxEkQmQVAfs4BZLT+6eTbZgDomQkWZ2hrlGWIBUBmTgAAAJmZYHESQ6y5CNsIQDmO+5zE9VhzI2wjAH+ZYHG2lW2xqfVvPzPLO4Qy9ePNDMBAHPQ528rn2MrKuebuoWKzJUMsgIEILOJ4myCPf+BgtRSOnux1CEBQAgsAIDOBRQFZLnjPPvup9d0+hlgA/RNYlHH597+3nvVH3eeqKgJgA58ipLw1sfIip+Z//WB1Vcwm720AeiawqOJgY91+wvFMqTuaklkAfXJ8BwDIzASLWo4PsbKofnGVNzkAHRJY1CWzksYC6I/AorpQXwvtsncAMhBYRBCqsZLMAuAgR3Mi8Dy88XU6AD1wYgMAyMwSIaGsHN6c+sYgyADJmx+AhgksYnpbOdn7I0hXzWksgFYJLIJ70T1b++P68FcCRtUjmQXQHoFFExZLaFN5NNFSL8gsgJY4atOExSdq6820yVAbC9A8gQUAkJnAomlDzXWG2liAtgksWvHsuTpUdgy1sQANE1h04G129NQlbvUO0ACBRUNePF1fN4fnOQBFOfEAAGQmsGjL7iFWZ4baWID2uNEoLcqyINhBo3iDBBCUwKJFub4TuoPGSjILICCBRbue5dGO4Gi9tDQWQCwCiz48fpHz7p9zp5Vv6dFYAIE4KAMAZGaCBUfEGWV5swQQiMCCLIKUlswCCOH/AeH+5Gru356QAAAAAElFTkSuQmCC\n", + "text/plain": [ + "" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.visualize_a_bbox('trunk')" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "c5a89962", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAGECAIAAABBANPuAAAX4UlEQVR4nO3da26jWLuAUdqqUZwBHp1BRBayMohP3wB7FJF1fpAiBNuYy2Zf11LU6qrKxU4c8/hlA10HAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQPX+SX0DgPr1fb/wR4D6CCzgRAstJbOAigks4BQr+0lmAVW6pL4BQIXWZ5PAAqoksAAAArOLEAhsHEo9/s/bDwnlvuWdvdAEgvPEApxiaKbpfwO6v3vb/dkAgjDBAkJ6bKmVjTW8Qz6J49UncMSf1DcAqNb6XYQAlfEiDThL3/frdxHmtofOTkPgCIEFBPK7R8a6Wuly//WWj5xuC1AMa7CgSR8fz//+83PnJ/ybIf2tH/9u0y7C/vr8fe55vAzM41YAxRBYUJ1X8XSSaZPdu+53Y62UeV3NZHmjgLxY5A6hRe6b5Mb7+/n5nR59gM+aZ1oNVu40zPgeAKfzDAAE9mocFer9AfJnggXbtTajWmn8tlw+dw+xch5cbfU46KrozgFvWIMF78ipXfo/q16/Xds+RZbkgloJLJjQUqEtZNZ4aKHzIExJLqiDwKIZ4imdWWYtn7VBb03pLSiUNVjA6fqvr58/7D7VFkA5TLCokWFViR7CyyhrxjQLCiKwqIKiqtXf6hJbM2ILMiewKJaoas3vEZfkmtJbkBuBRSHkFFNia5HeguQEFvnRUmwyiS2lNaO0IBW/fQAAgZlgNWp2IqLl8xKdy7yKgEyzXvBiGiITWM1ZaKlgmaWZyITe+k1mQTQCqyEr+2lDZgkpiuO8DzILohBYrdg0nVp6Z1FFTT4/my0tmQWncqkc1tFVVOnj47sz2iut4f7KLDiJX64mjBOp/q+V7w8A7GCC1Z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PmSIBUDNBBahbMqXHELkvN7K4d4BkJLAIqD1yZJPgsgsAMKzDSCg9Q8nV5sBoGYmWJyhrFGWIRYAgdkAAAAEZoLFSQyxpnK4jwDE43mfk1iPNdXCfQTghwkWZ1vZFptaf/ycQV4hxKkfL2YAGuJJn7OtfIytrJx76B6KNlsyxAJoiMAiH28T5PEdDlZL5OgJXocAZEpgAQAEJrCIIMiC9+Czn1TX9jHEAqifwCKOy9+3t171R9rHqioCYANHERLfmlhZyKnphx+sroTZ5LUNQM0EFkkcbKzxMxzPlLSjKZkFUCfP7wAAgZlgkcrxIVYQyRdXeZEDUCGBRVoyq9NYAPURWCSX1WWhLXsHIACBRQ6yaqxOZgFwkGdzcuBxOHI5HYAa2LABAARmFyFZWTm8OfWFQSYDJC9+AAomsMjT28oJ3h+ZdNWUxgIolcAicwvds7U/7g8fkmFUPZJZAOURWBThaQltKo8iWmqBzAIoiWdtivD0gVp6M23S1J0FKJ7AAgAITGBRtKbmOk3dWYCyCSxK8eqx2lR2NHVnAQomsKjA2+yoqUuc6h2gAAKLgiw8XJebw+McgKhseAAAAhNYlGX3EKsyTd1ZgPI40SglCrJDsIJG8QIJIFMCixKFuiZ0BY3VySyADAksyvUqj3YER+mlpbEA8iKwqMPjhZx3f56ZUq7So7EAMuJJGQAgMBMsOCKfUZYXSwAZEVgQRCalJbMAsvD/l4C+vBKKayYAAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.visualize_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "id": "051d143f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "([], [], [], [], [], [])" + ] + }, + "execution_count": 80, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.landmark_generic('caudal_fin')" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "id": "4c7f7728", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[]" + ] + }, + "execution_count": 79, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.clean_trait_region(masks_dict_2['caudal_fin'])" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "50200a40", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[,\n", + " ,\n", + " ,\n", + " ,\n", + " ,\n", + " ]" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAADFCAYAAACvtbI0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAhsUlEQVR4nO3deXxU5dn/8c81k40kLGELkTXIJiiiKJtaFdTihlo3VHywVmmfB62gYqXtz6Xa1qUi1bphXcAF6oK7ghvWVlAEZN81IEvYwhpCQmbm/v0xAwaykGUmM5l836/XvObMfe5zzhUSrpzc55z7MuccIiISXzzRDkBERMJPyV1EJA4puYuIxCEldxGROKTkLiISh5TcRUTiUMSSu5kNNrMVZrbazO6M1HFERKQ0i8R97mbmBVYCZwPrgW+Bq5xzS8N+MBERKSVSZ+59gNXOuR+cc/uBKcBFETqWiIgcJiFC+20NrCvxeT3Qt7zOSZbsUkiLUCgiIvFpDzu2OedalLUuUsndymg7ZPzHzEYAIwBSSKWvDYpQKCIi8elT98ba8tZFalhmPdC2xOc2wMaSHZxzE5xzJznnTkokOUJhiIjUT5FK7t8Cnc0s28ySgKHAuxE6loiIHCYiwzLOOZ+Z3QRMB7zA8865JZE4loiIlBapMXeccx8CH0Zq/yIiUj49oSoiEoeU3EVE4pCSu4hIHFJyFxGJQ0ruIiJxSMldRCQOKbmLiMQhJXcRkTik5C4iEoeU3EVE4pCSu4hIHFJyFxGJQzWaOMzM1gB7AD/gc86dZGZNgX8BHYA1wBXOuR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EISV3EZE4pOQuIhKHlNxFROKQkruISBxSchcRiUP/HxwNzujzmXL7AAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "mask = img_seg_2.mask['caudal_fin']\n", + "trait_filled = img_seg_2.remove_holes(mask)\n", + "total_area = np.count_nonzero(trait_filled == 1)\n", + "trait_label = label(trait_filled)\n", + "trait_region = regionprops(trait_label)\n", + "plt.imshow(trait_filled)\n", + "trait_region" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "c6a12e38", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'img_seg_2' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Input \u001b[0;32mIn [26]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mimg_seg_2\u001b[49m\u001b[38;5;241m.\u001b[39mlandmark_generic()\n", + "\u001b[0;31mNameError\u001b[0m: name 'img_seg_2' is not defined" + ] + } + ], + "source": [ + "img_seg_2.landmark_generic()" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "id": "9ae508f7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'1': (118, 51), '2': (64, 170), '3': (38, 378), '4': (71, 487), '5': [], '6': (144, 678), '7': [], '8': [], '9': [], '10': (165, 484), '11': (161, 220), '12': (132, 209), '13': (171, 130), '14': (112, 96), '15': (114, 145)}\n", + "{'SL': 627.5388434192739, 'EA': 1939, 'HAt': 5286.499999999997, 'HAp': 11667, 'HCL': 'WIP', 'ED': 49.68713593317168, 'HL': 158.61904047118682, 'HD': 114.23221962301179, 'pOD': 45.39823785126467}\n", + "{'dorsal_fin': {'number': 1, 'percentage': 1.0}, 'adipos_fin': {'number': 3, 'percentage': 0.6712328767123288}, 'caudal_fin': {'number': 6, 'percentage': 0.4504856052722858}, 'anal_fin': {'number': 0, 'percentage': 0}, 'pelvic_fin': {'number': 2, 'percentage': 0.5905550146056475}, 'pectoral_fin': {'number': 1, 'percentage': 1.0}, 'head': {'number': 1, 'percentage': 1.0}, 'eye': {'number': 1, 'percentage': 1.0}, 'caudal_fin_ray': {'number': 0, 'percentage': 0}, 'alt_fin_ray': {'number': 0, 'percentage': 0}, 'trunk': {'number': 1, 'percentage': 1.0}}\n" + ] + } + ], + "source": [ + "print(img_seg_2.all_landmark())\n", + "print(img_seg_2.all_measure())\n", + "print(img_seg_2.presence_matrix)" + ] + }, + { + "cell_type": "markdown", + "id": "fc42d555", + "metadata": {}, + "source": [ + "### Develop measure TL (total length)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "35d75ec4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[0, 0, 0, ..., 0, 0, 0],\n", + " [0, 0, 0, ..., 0, 0, 0],\n", + " [0, 0, 0, ..., 0, 0, 0],\n", + " ...,\n", + " [0, 0, 0, ..., 0, 0, 0],\n", + " [0, 0, 0, ..., 0, 0, 0],\n", + " [0, 0, 0, ..., 0, 0, 0]], dtype=uint8)" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "\n", + "import math\n", + "\n", + "img_seg.combine_trait_mask(['head','trunk','caudal_fin'])\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "92a1364a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "729.422881988705 729\n" + ] + } + ], + "source": [ + "head_trunk_caudal = img_seg.combine_trait_mask(['head','trunk','caudal_fin'])\n", + "trait_region= img_seg.clean_trait_region(head_trunk_caudal)\n", + "orientation = trait_region.orientation\n", + "xb0, yb0, xb1, yb1 = trait_region.bbox\n", + "len1 =(yb1-yb0)/math.sin(orientation)\n", + "bbox_len = yb1-yb0\n", + "print(len1, bbox_len)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "2e844216", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "22 36 284 765\n" + ] + } + ], + "source": [ + "# Develop a tool to visualize the box around biggest blob for one specific trait\n", + "# Draw a bbox \n", + "# importing image object from PIL\n", + "from PIL import Image, ImageDraw\n", + "\n", + "\n", + "top, left, bottom, right = trait_region.bbox\n", + "wide = bottom-top\n", + "height = right-left\n", + "shape = [(left, top), (right,bottom)]\n", + " \n", + "# creating new Image object\n", + "img_arr = img_seg.img_arr\n", + "img = Image.fromarray(img_arr)\n", + "img1 = ImageDraw.Draw(img)\n", + " \n", + "# create rectangle image\n", + "img1 = ImageDraw.Draw(img) \n", + "img1.rectangle(shape, outline =\"red\")\n", + "img\n", + "print(top, left, bottom, right)" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "id": "5676387a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAndElEQVR4nO3dd3xUZb7H8c9vSiY9BEInQIDQBaQJ6iqiCHJFFCzY16uCgAXxrqKrXnd1vZbVRXdVxIYVFssCKosFZdkV6b0FQkAICQRCCemTmef+kUGDBDIJMzmTye/9euWVyZkz5/wCyTfPPOc5zyPGGJRSSoUXm9UFKKWUCjwNd6WUCkMa7kopFYY03JVSKgxpuCulVBjScFdKqTAUtHAXkWEikiYi6SIyJVjnUUopdTIJxjh3EbED24AhQCawArjeGLM54CdTSil1kmC13PsD6caYDGNMKTALGBmkcymllPqVYIV7S2BPha8zfduUUkrVAkeQjiuVbD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Jvyv9S3A40ov9i23fe5YYX9f++rOw24rJZqPJ/yt4PrgbW+j+EhWGcPYI2vzo3A477tIVXnr2oexC8XVEOqTsr7stf5PjYd/10JtTp95+0FrPT9388BEkO0zmggF0iosC3k6qzph96hqpRSYcjqbhmllFJBoOGulFJhSMNdKaXCkIa7UkqFIQ13pZQKQxruSikVhjTclVIqDGm4K6VUGPp/Eji3TxdDAYwAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(head_trunk_caudal)" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "id": "235a4e0f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 78, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAgFklEQVR4nO3deXxU5dn/8c81M8lkIxAIS4AAAVkkiCiIoP1ZBCmUiqi4oCjWtmIVtYqtorX+XPtYt1LrSl1AURCtZauCSOWhsohssiYQAkJISACBkH2W+/kjgwYIySSZyZmZXO/Xa14zc+Ys37Bcc3Kf+9y3GGNQSikVWWxWB1BKKRV4WtyVUioCaXFXSqkIpMVdKaUikBZ3pZSKQFrclVIqAgWtuIvISBHJFJEsEZkSrOMopZQ6nQSjn7uI2IEdwHAgB/gGuMEYsy3gB1NKKXWaYJ25DwSyjDHZxpgKYDYwJkjHUkopdYpgFfcOwL4q73N8y5RSSjUCR5D2K9UsO6n9R0QmAhMB7Nj7x5EYpChKKRWZjnPkkDGmdXWfBau45wCpVd53BHKrrmCMmQZMA0iUluZCGRakKEopFZm+MB9/d6bPgtUs8w3QXUTSRCQaGAf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+1ylAZnVZgcXAYAvyzgOGh3JOIA5YD1wYijmpHLl0KTC0SnEPxZzVFfeQygkkArvxXc8L1ZynZPsZsCLUc9b1YXWzTDhM7BGyk5KISBfgPCrPikMuZxhN8jIVeADwVlkWijkN8LmIrBORiSGasytwEHjH18z1pojEh2DOqsYBs3yvQzlnnVhd3P2a2CNEWZpdRBKAfwL3GmMKa1q1mmWNktMEYZKXQBORy4ECY8w6fzepZllj/b1fbIw5H/g5MElELqlhXatyOqhs2nzNGHMelcOK1HQtzer/R9HAFcBHta1azbKQrlVWF3e/JvawWIMmJQkGEYmisrC/b4z5JFRznmACOMlLEFwMXCEie4DZwFARmRmCOTHG5PqeC4B/UTk3cajlzAFyfL+lAXxMZbEPtZwn/BxYb4zJ970P1Zx1ZnVx/wboLiJpvm/QcVRO9hFKQmpSEhER4C1guzHmxRDOGRaTvBhjHjLGdDTGdKHy399/jDE3hVpOEYkXkWYnXlPZTrwl1HIaYw4A+0Skp2/RMCrndgipnFXcwI9NMifyhGLOurO60R8YRWWPj13AHy3OMgvIA1xUflP/GmhF5cW2nb7nllXW/6Mvdybw80bK+BMqfx3cBGz0PUaFYM6+wAZfzi3Ao77lIZXzlMxD+PGCakjlpLIt+1vfY+uJ/yuhltN33H7AWt/f/VwgKURzxgGHgeZVloVczvo+9A5VpZSKQFY3yyillAoCLe5KKRWBtLgrpVQE0uKulFIRSIu7UkpFIC3uSikVgbS4K6VUBNLirpRSEej/ANNmtjnppiQVAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# Example with other image with 2 pevilc fins\n", + "# load the test image, you can add more test image if you have bug related to specific images.\n", + "segmented_file = '../Test_Data/INHS_FISH_85194_segmented.png'\n", + "#segmented_file = '../Test_Data/INHS_FISH_000742_segmented.png'\n", + "img_seg_2 = tc.segmented_image(segmented_file)\n", + "masks_dict_2 = img_seg_2.mask\n", + "\n", + "head_trunk_caudal = img_seg.combine_trait_mask(['head','trunk','anal_fin'])\n", + "plt.imshow(head_trunk_caudal)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "cc5fefd2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAADFCAYAAACvtbI0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAANVklEQVR4nO3dW6xc5XnG8f8Tx0A4pNjlIAdQIMiJSqPGIIuDqCIKOQCqAlxQGamVL6jgAqSgVqpMI7XkAimtQuhVkEJDa7UJlJJQEKIlxk1Upao4mBhiDg4kccHYsZM0EaQXNMDbi1lbTLb3trf37PFa/vL/SaNZ880azwM2j4dvz8ybqkKS1JZ39R1AkrT0LHdJapDlLkkNstwlqUGWuyQ1yHKXpAZNrdyTXJpke5KXkmyY1vNIkvaVabzPPcky4HvAx4GdwBPANVX13JI/mSRpH9N65X4u8FJV/aCq/g+4B7hiSs8lSZrl3VP6dU8BXhm7vRM4b76Tj8iRdRTHTCmKJLXpdX72k6o6ca77plXumWPtV/Z/klwHXAdwFEdzXi6ZUhRJatOjdd9/z3fftLZldgKnjd0+Fdg1fkJVfamq1lbV2uUcOaUYkvTraVrl/gSwOskZSY4A1gEPTum5JEmzTGVbpqreTHIj8AiwDLirqp6dxnNJkvY1rT13quph4OFp/fqSpPn5CVVJapDlLkkNstwlqUGWuyQ1yHKXpAZZ7pLUIMtdkhpkuUtSgyx3SWqQ5S5JDbLcJalBlrskNWiiLw5LsgN4HXgLeLOq1iZZCfwTcDqwA/iDqvrZZDElSQdjKV65/15Vramqtd3tDcDmqloNbO5uS5IOoWlsy1wBbOyONwJXTuE5JEn7MWm5F/CNJFu6magAJ1fVboD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OZP8PrC3qrYs9CFzrB2q3/cLq+oc4DLghiQf3c+5feV8N6OtzTuq6mxGXyuyv5+l9f3f0RHAp4B/PtCpc6wNuqv6LvedwGljt08FdvWUZT57kqwC6K73duu9ZU+ynFGxf6Wqvj7UnDOq6ufAt4BLGV7OC4FPJdkB3ANcnOQfB5iTqtrVXe8F7gfOHWDOncDO7v/SAO5jVPZDyznjMuCpqtrT3R5qzoPWd7k/AaxOckb3N+g64MGeM832ILC+O17PaI97Zn1dkiOTnAGsBh6fdpgkAb4MPF9VXxhwzhOTHN8dvwf4GPDC0HJW1c1VdWpVnc7oz9+/V9UfDi1nkmOSHDdzzGifeNvQclbVj4BXknyoW7oEeG5oOcdcwztbMjN5hpjz4PW96Q9czugdH98HPtNzlruB3cAvGf1NfS3wm4x+2PZid71y7PzPdLm3A5cdooy/y+h/B58BtnaXyweY83eA73Q5twF/0a0PKueszBfxzg9UB5WT0V72093l2Zn/VoaWs3veNcCT3e/9vwArBprzaOCnwG+MrQ0u52IvfkJVkhrU97aMJGkKLHdJapDlLkkNstwlqUGWuyQ1yHKXpAZZ7pLUIMtdkhr0/7mdLNmgreKfAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(img_seg_2.mask['anal_fin'])" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "id": "38602cff", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "692" + ] + }, + "execution_count": 61, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.measure_body_length()" + ] + }, + { + "cell_type": "markdown", + "id": "4f5ea07b", + "metadata": {}, + "source": [ + "### My Stuff to play" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "fbcabc0a", + "metadata": {}, + "outputs": [], + "source": [ + "# Example with other image with 2 pevilc fins\n", + "# load the test image, you can add more test image if you have bug related to specific images.\n", + "segmented_file = '/fs/ess/PAS2136/BGNN/Minnows/Segmented/INHS_FISH_00190_segmented.png'\n", + "#segmented_file = '../Test_Data/INHS_FISH_000742_segmented.png'\n", + "img_seg_2 = tc.segmented_image(segmented_file)" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "e95c5da2", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAD/CAIAAACGkiVYAAAUTklEQVR4nO3dbY6jSLqAUa5Vq7gLvJpFpCzLykW0eoF3FS1rfpBFU4BxABEQH+eoNequqsxyMib95Es46DoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgOr8z9UPAKBRr/e/dTvvUQBJCCyAk6wU1TtKCwolsAAi2xFS62QWFEdgAYSKXk47iC0ogsAC+CCHrhrTWJA/gQWwILeomtBYkDmBBfAj86iak1mQLYEFNKq4nFqksSBPAgtoSx1dNaaxIEMCC2hCfV01prEgNwILqFbdUTWhsSArv65+AACRNdVVQJ4EFlAJXQXkQ2ABxZNWQG6swQLKo6gmLMCC3JhgAcXQVUApTLCA3OmqdcZXkCEnJpA1dQWUyAQLyIic2spPyZAna7CA6+kqoDImWMCVpNURxleQLRMs4AK6CqibCRZwBkUVnfEV5MwZCiSnrqLzvRsy5xIhkJC0AtoksIAkpBXQMoEFBHk8Hiv/OdBVAJ1F7sBH71pq8lvS6kzWYEHmBBbw1kpajd3D/hgRCSzInJMUWBZYV13XPQXWuXzjhvw5TwEAInOJEFgwjK/m//KOC4Wn8ZMx5M95CrzVR9X4f7mc79pQBNs0AFPhU6ux5+NhiAXQE1jAmn2xRSLGV1AKa7CgVV9f737n8Wv6o1fgVUITrKTUFRTEBAuq9r6iQlh9BbCPCRYU7lhCLRpPsDZdIjTBSsf4CsoisGhPgiKpz/wq4UfqKh11BcVxiZDaySkKp66gRCZY1EVOxbNpiPX455+u617f38keTrsEFpTIBIuSyanM3Ib/R76/X5c+EoBrmWCRMf10tcAhVj+++sh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Adikw9t8/8/dPbBAlIpaAOo64qgoIO0icYCJwGQRimvsZc+TpcLoVbObCAZ7RDGcYL6OK2BlDJvh2weXjYPBIjDGizgFBmuNsoyajI8TjtkeWjhVE4C4BS5rTbK6sEA1fEtBiAjwg/q4FQGTiQfAjhIUAFrsIArXLvUqJCEKXc9ViEHGBJyEgBX8AocwEGCcjl9AfKlsaBQzl3gItohjOMEJXLiAtfRDmFy2+NiXUEPFdJxHgCX8moczKGCgjhfgaudHA4ld0pZoyxomTMVyIBq2CLno5XzY4Mz2QcLyMYJ+z5V9/qf1V5Z1R1d2M/ZAFAwTQN5MsECcpJ0IFN1jFw+yqr66MJmTgggJ+lepWt//b/266v96MJmJlhAfuJOY1p98T9nptXq0YUPBBaQqyiB0Pbrf+rGavvowhqBBeTtSCN4/e+6Lk1mObSwTmAB2dsXCBJgycHYclAhkMACyhFeB0Jgu/HRdfzgIIEFlGY9s6QBkAHfiYCiqCugBL4ZAQBE9uvqBwAQg9kVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqfwXsIwvAwGVwQ4AAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.visualize_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "723edb48", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAD/CAIAAACGkiVYAAAIVklEQVR4nO3d2XLbOBBAUTGV//9lzYOqHI8XiaRAoJdznqcmWoDGDexItxsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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odTtu2NXnKTW4uu/37QYD4DNavipVH83u78ukw5G0t/yoBzGew/ipvkXw+L/M+i4GqBkSoz20H4DODdZcUmfI4JlM81PnqNYS6AojMbD1Au2RXJibWfqMzAC+ZrefprYwq9UTzj24HiMyQHUx1RVa7Kl6uvdpPHyAUA/dykisIeQHANI6c2fTWKgILgGkcOSnF+RdkF/Xikwd29E/UVQDM5+zJyjf7fvjxpaj3NAFIxCGU2KHGEhwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQ23/xPM6vg/F/UwAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.visualize_major_minor()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "12b4442b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL': 586.0034129593445,\n", + " 'EA': 922,\n", + " 'HAt': 8437.999999999995,\n", + " 'HAp': 16034,\n", + " 'HCL': 'WIP',\n", + " 'ED': 34.262616074167774,\n", + " 'HL': 151.64761785138597,\n", + " 'HD': 158.3161394173064,\n", + " 'pOD': 32.31098884280702}" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.all_measure()" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "bcdc246a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL_bbox': (587,),\n", + " 'HL_bbox': 152,\n", + " 'ED_bbox': 31,\n", + " 'HD': 145,\n", + " 'pOD_bbox': 30,\n", + " 'fish_angle': 2.0124973591623814}" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.measure_using_bbox()" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "77b08154", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAZo0lEQVR4nO3dbW6bXBqA4TOoq5gVziIiC1lexGgW+K4isuYHKSGACWDgfF2XqqpJ7ISmrn3nOcc4BAAAAAAAAAAAAAAASMS/Yh8AUIvn4kebi44C4AoCCzjSckUt01hAMQQWsN87OTVLYwFlEFjAWofn1CyNBRTgT+wDAJJ2TVQBFMYEC2qXYEIZYgG5E1hQkQRb6hWNBWRNYEFMbdsuvPmmjHJqlsYC8iWwII6Flnons3KPqn2kGJAagQVXW9lP6zOrzqhaSXsBUQgsuNSm6dTsheXUgeQXcBKnaYAMiKqTjL6xegs4igkWXKefSE3/8Mrt0G3vrKS0gDe5G4GrdVE1/J3UPP/+AtjHBAsuMm2plY1liJUUP5UCa9iDBRGsXyIkNcOxltgCXnH/ABG0bWuJsACWEYFXTLDgatKqMH1j+YEV6NmDBW/7+FhzqfbP988zm5YI28/P5+Ox58CIR2xB5QQWrLAuoX41bKy1V/n8HL1HbGVHbEGFLBHCxEE5dZJm8fDkV4KsIUKFTLDg0qLaNMSajq/2UV0JEltQNhMsqpH2XOpUs0Mv1RWXsRaUzQSLEqXdUiuHWEeNr9Z6PJxxIBaNBeURWJQi7aiaWsisq9NqjvnWxTQWFEZgkaHcWmrBKLNSSKtZeusaMguKIbBIW0EtVRK9dR6NBWUQWKRBSGVOch1OaUHWBBbxiKoSKa1jySzIlMDiWqKqGkrrQDILsiOwOJ+oqp7Yep/GgrwILM4krfhJab1JZkEuBBYn0FX8ynlN99JYkAWBxUFEFbuJre1kFiROYPEeXcVRZNZ2MguSJbDYS1pxhscjDF4ImV9pLEiTwGI7acU1z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4FiEJuWCs9Z10Hx9nf60Fwz1Y4w8NdmXNfPS8JxKqIoDjCCxSdFJpzQzM4mXW+rOMfl+l763n4vdHKgHEZg8WKbpuR/x0ufCa5Ho8wjunYJBQAGkzwSInW5Mr8dNDbDrNlXNiAWTEBIucJB5MANDxcAXRbDjFqPEVQFYsEUJ8C/0krQByJLAgFbMvSggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OP/SIFCPeO9YoQAAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.visualize_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "id": "e8227220", + "metadata": {}, + "outputs": [], + "source": [ + "_, _, _, _, center_eye, _ = img_seg.landmark_generic('eye')\n", + "_, _, _, _, _, new_mask_head = img_seg.landmark_generic('head')\n", + "\n", + "row_eye = round(center_eye[0])\n", + "col_eye = round(center_eye[1])\n", + "# horizontal line\n", + "head_hori_line = new_mask_head[row_eye,:]\n", + "index_hori = np.where(head_hori_line == 1)[0]\n", + "start_h = (row_eye,np.max(index_hori))\n", + "end_h = (row_eye,np.min(index_hori))\n", + "\n", + "# vertical line\n", + "head_verti_line = new_mask_head[:,col_eye]\n", + "index_verti = np.where(head_verti_line == 1)[0]\n", + "start_v = (np.min(index_verti),col_eye)\n", + "end_v = (np.max(index_verti),col_eye)" + ] + }, + { + "cell_type": "code", + "execution_count": 115, + "id": "43a0d2f2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(196, 81, 97, 81)" + ] + }, + "execution_count": 115, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_v + end_v" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "id": "786cf439", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-99\n" + ] + }, + { + "data": {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0YiPFs5LTgHzEVg0tWZWUVoPjHEClqgC5uZehHTWuLTeCu90avlDn3W9Q3OuGy1rKYBPBBaBNIit6wgtXGNd6+pWy9LSSQD1CCwiOqi03uvqKkJm3U2rxx6Hl1QC6E1gEVf1zLoTWJ+1Sa4dUQVAHgKLTLYm11NFBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAb/8H15IUEBgrp10AAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 117, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from PIL import Image\n", + "img_arr = img_seg.img_arr\n", + "img = Image.fromarray(img_arr)\n", + "img1 = ImageDraw.Draw(img)\n", + "\n", + "line_h = (end_h[1],end_h[0],start_h[1],start_h[0])\n", + "line_v = (end_v[1],end_v[0],start_v[1],start_v[0])\n", + "print(end_v[0]-start_v[0])\n", + "img1.line(line_h, fill=\"red\")\n", + "img1.line(line_v, fill=\"red\")\n", + "img" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "6847b4fb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "145" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "head_depth = np.count_nonzero( head_hori_line)\n", + "head_depth" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "b8d95834", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(800,)\n", + "(315, 800)\n", + "(315, 800, 3)\n" + ] + } + ], + "source": [ + "img_seg.visualize_trait('head')\n", + "print(head_hori_line.shape)\n", + "print(new_mask_head.shape)\n", + "print(img_seg.img_arr.shape)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "ca08de0e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "39" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "index = np.where(head_hori_line == 1)[0]\n", + "np.max(index)\n", + "np.min(index)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "fd4282e4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAApZklEQVR4nO3deXjU1b3H8feZ7BsQwhaWEMISAWUTWQRZIjvKUjfUgnpR5FZFsK2ibbXeXh/X6rXecituFWu1VK1braJWBVtkC4uAQCBhSSAEkkD2dc7940xkwIRMkpn5/WbyfT1Pnkwmv/zmy5JPTs6qtNYIIYQILg6rCxBCCOF9Eu5CCBGEJNyFECIISbgLIUQQknAXQoggJOEuhBBByGfhrpSappTaq5Tar5Ra7qvXEUII8UPKF/PclVIhwD5gMpANbAKu11rv9vqLCSGE+AFftdxHAPu11pla6yrgTWC2j15LCCHEOXwV7t2AI24fZ7ueE0II4QehPrqvque5s/p/lFKLgEWuDy/2UR1CCBHMTmqtO9b3CV+FezbQw+3j7sBR9wu01iuBlQBKKdngRvhdBBDi9nEVUGNRLUI006GGPuGrcN8E9FVK9QJygHnADT56LSEa5AC6ut4PAoa4fW4yZ/cVfgEsA0r8VZwQPuSTcNda1yil7gQ+wTSOXtZa7/LFa4nWTXH2wFEMJsRHYvr6woHxrvfhmNZ6Q5KBUmCpD+oUwt98MhWyyUVIt4zwQBtMS6ErMNr1XCowwe2aaNdzivoHfhpTCCwE3uOcQSIh7GmL1np4fZ/wVbeMEC0WAfQChgHDgSlAPBDpeu8L8cALwOWYPnh3BcC7gNP18SngmI/qEKKlpOUubEEBPYELgelAChCL6VoJ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iXfarU6tdS5wRCmV6nrqcszZDraq0831nOmSqavHjnU2ndWd/sAMzIyPA8AvLK7lDeAYUI35Sb0QSMAMtmW43rd3u/4Xrrr3AtP9VONYzK+DO4BtrrcZNqxzELDVVedO4EHX87aq85yaJ3BmQNVWdWL6sre73nbVfa/YrU7X6w4BNrv+7d8F4m1aZzSQD7R1e852dTb3TVaoCiFEELK6W0YIIYQPSLgLIUQQknAXQoggJOEuhBBBSMJdCCGCkIS7EEIEIQl3IYQIQhLuQggRhP4fMnqXgppQQVwAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(img_seg.img_arr)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c3772f3c", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/Scripts/Morphology_dev.ipynb b/Scripts/Morphology_dev.ipynb index d1b7b8a..8f7544c 100644 --- a/Scripts/Morphology_dev.ipynb +++ b/Scripts/Morphology_dev.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 42, "id": "602dc370", "metadata": {}, "outputs": [ @@ -31,7 +31,7 @@ "" ] }, - "execution_count": 22, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -52,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 43, "id": "e620246b", "metadata": {}, "outputs": [], @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 44, "id": "2289de98", "metadata": {}, "outputs": [], @@ -74,7 +74,8 @@ "img_seg = tc.segmented_image(segmented_file)\n", "\n", "# oupput the variables create at initialization time\n", - "measurement = img_seg.measurement\n", + "measure_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", + "measure_lm = img_seg.measurement_with_lm # measurement using bbox\n", "landmark = img_seg.landmark\n", "presence_matrix = img_seg.presence_matrix\n", "img_landmark = img_seg.visualize_landmark()" @@ -95,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 38, "id": "ae9eb407", "metadata": {}, "outputs": [ @@ -115,7 +116,7 @@ " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" ] }, - "execution_count": 25, + "execution_count": 38, "metadata": {}, "output_type": "execute_result" } @@ -127,39 +128,98 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 45, "id": "b24d03d1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'SL': 586.0034129593445,\n", + "{'SL_bbox': 587,\n", + " 'HL_bbox': 152,\n", + " 'ED_bbox': 31,\n", + " 'HD_eye': 100,\n", + " 'pOD_bbox': 30,\n", + " 'fish_angle': 2.0124973591623814}" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# measurement dictionnary with measurement using bbox\n", + "measure_bbox" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "e5d892d3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL_lm': 586.0034129593445,\n", " 'EA': 922,\n", - " 'HAt': 8437.999999999995,\n", + " 'HAt_lm': 8437.999999999995,\n", " 'HAp': 16034,\n", - " 'HCL': 'WIP',\n", " 'ED': 34.262616074167774,\n", - " 'HL': 151.64761785138597,\n", - " 'HD': 158.3161394173064,\n", - " 'pOD': 32.31098884280702,\n", - " 'BL': 729,\n", - " 'BD': 262}" + " 'HL_lm': 151.64761785138597,\n", + " 'HD_lm': 158.3161394173064,\n", + " 'pOD_lm': 32.31098884280702}" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# measurement dictionnary with measurement using landmarks\n", + "measure_lm" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "fe50c813", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL_bbox': 587,\n", + " 'HL_bbox': 152,\n", + " 'ED_bbox': 31,\n", + " 'HD_eye': 100,\n", + " 'pOD_bbox': 30,\n", + " 'fish_angle': 2.0124973591623814,\n", + " 'SL_lm': 586.0034129593445,\n", + " 'EA': 922,\n", + " 'HAt_lm': 8437.999999999995,\n", + " 'HAp': 16034,\n", + " 'ED': 34.262616074167774,\n", + " 'HL_lm': 151.64761785138597,\n", + " 'HD_lm': 158.3161394173064,\n", + " 'pOD_lm': 32.31098884280702}" ] }, - "execution_count": 26, + "execution_count": 54, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# measurement dictionnary\n", + "measurement = {**measure_bbox, **measure_lm}\n", "measurement" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 7, "id": "ffda5440", "metadata": {}, "outputs": [ @@ -180,10 +240,13 @@ " '12': (162, 187),\n", " '13': (224, 138),\n", " '14': (136, 66),\n", - " '15': (134, 96)}" + " '15': (134, 96),\n", + " '16': (115, 81),\n", + " '17': (153, 81),\n", + " '18': (135, 81)}" ] }, - "execution_count": 27, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -195,18 +258,18 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 15, "id": "8b7d1b1a", "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAY90lEQVR4nO3dbW6jyrqA0Tooo7gjPIOILGR5EFt7gGcUkXV/4KYJxhgwUF9rqdXqdBzHSbvtJ28VOAQAAAAAAAAAAAAAAEjEf2LfAKAW99n3NifdCoAzCCxgT/MVNU9jAcUQWMB2n+TUJI0FlEFgAUvtnlOTNBZQgK/YNwBI2jlRBVAYEyyoXYIJZYgF5E5gQUUSbKlXNBaQNYEFMbVtO/PmhzLKqUkaC8iXwII4Zlrqk8zKPaq2kWJAagQWnG1hPy3PrDqjaiHtBUQhsOBUq6ZTkxeWUzuSX8BBnKYBMiCqDjL6xuotYC8mWHCefiL1/IdXLrtue2chpQV8yMMInK2LquHvpOb+5xfANiZYcJLnllrYWIZYSfFTKbCEPVgQw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Jg8a6MAitorAs8HuGZwE1CbAFRCSwOoLEqlUhLvaKxgHgEFsfIqLGqCKzRfqZpBv0aHymX03oaC4hEYHGYXBqrtMA6dVdT7gQWEMmf2AdAOZrQ5NJY2RNVAGkTWBxJY72j/fPj/2P7+TlzIWkFkAOBxcE01g6jtBq+8zuzpNVW1geBeAQWx2tCE/LZkhXXbFpNL9Deyto3dgF1BUTlPoizNG5dv/m1rr4vaXy1UtN8/QKIygSLE1ku5HRaCkiS0zRwutQaK5HTNAzHV23b9r/P/uHrTQuFHVEFJM/9FKezVrigbdtxRQ1ia/ShGvVLfsNfAMlzV8UVNNZIP76aBtbStYrZiTWbTVoKKIg9WFzEUwvrpZOA+ggsLtWPspRW4UQVUDd3gsTRLwJd/3XHL4TMmyztAUx4FiEJuWCs9Z10Hx9nf60Fwz1Y4w8NdmXNfPS8JxKqIoDjCCxSdFJpzQzM4mXW+rOMfl+l763n4vdHKgHEZg8WKbpuR/x0ufCa5Ho8wjunYJBQAGkzwSInW5Mr8dNDbDrNlXNiAWTEBIucJB5MANDxcAXRbDjFqPEVQFYsEUJ8C/0krQByJLAgFbMvSggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OP/SIFCPeO9YoQAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, - "execution_count": 28, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -221,7 +284,7 @@ "id": "100fd501", "metadata": {}, "source": [ - "## 3- Explore the class works\n", + "## 3- Explore how the class works\n", "\n", " 1. Create the object Masks extraction : \n", " During the creattion of the object everything will happened automatically. We will detail the different step that has happened under the hood. The image is imported from the input file, the image is then convert in to 11 masks corresponding to each traits then, we clean the masks and extract morphological info such as area, centroid, landmarks... then we calculate the different measurements we want.\n", @@ -247,7 +310,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 38, "id": "f9ce0bf1", "metadata": {}, "outputs": [ @@ -255,7 +318,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "This is the list of the trait ['dorsal_fin', 'adipos_fin', 'caudal_fin', 'anal_fin', 'pelvic_fin', 'pectoral_fin', 'head', 'eye', 'caudal_fin_ray', 'alt_fin_ray', 'trunk']\n" + "This is the list of the trait : ['dorsal_fin', 'adipos_fin', 'caudal_fin', 'anal_fin', 'pelvic_fin', 'pectoral_fin', 'head', 'eye', 'caudal_fin_ray', 'alt_fin_ray', 'trunk']\n" ] } ], @@ -269,23 +332,23 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 41, "id": "fccc32b4", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 17, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" }, { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUFklEQVR4nO3dfXRU9Z3H8fd3ZkICieFBBQMJAp6IAhVE5EF3WytSkW2F1q3iI1q7VMWqtbsW2q2ntmuP1dbSs2qVaguWVhYfWtBaRWk9bUVUVFQeDM+V8KjIMxJI8t0/cjlNJZBJMpN75+bzOidn7vzmztxPePjk5jd37jV3R0RE4iURdgAREck8lbuISAyp3EVEYkjlLiISQyp3EZEYUrmLiMRQ1srdzEabWYWZrTKzydnajoiIHM6ycZy7mSWBFcAooBJ4HbjU3ZdlfGMiInKYbO25DwVWufsadz8AzALGZmlbIiLyCdkq9x7A+nr3K4MxERFpBaksva41MPZP8z9mNhGYCJAkeUYHirMURUQknnaz/UN3P76hx7JV7pVAWb37pcDG+iu4+zRgGkCxdfFhNjJLUURE4ulFf+LvR3osW9MyrwPlZtbbzNoB44G5WdqWiIh8Qlb23N292sxuBJ4HksAv3X1pNrYlIiKHy9a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78+ya85RsPwJW2T1nUz+sHpYJhgt72PaiJCLSG7iAmq1i2+UMoou8zAAeB7y1ltkxpwH+IyLrRWSKTXP2AfYDr/qGuV4WkRgb5qxtMvCO776dczaJ1eXeqAt72JSl2UUkFvgAeNgYU1LfqnUsa5GcJgAXefE3EbkWKDbGrG/sp9SxrKW+75cYYy4ErgYeEJFL61nXqpxh1AxtzjbGXEDNtCL17Uuz+ucoArgOeK+hVetYZuuusrrcG3VhD4s166IkgSAi4dQU+1vGmA/tmvM448eLvATAJcB1IrIXmA+MFpE3bZgTY0y+77YY+IiaaxPbLWcekOf7Kw3gfWrK3m45j7sa2GCMKfI9tmvOJrO63L8BUkQk2fcbdDI1F/uwE1tdlEREBHgF2GGMed7GOYPiIi/GmOnGmO7GmN7U/P/7whhzm91yikiMiLQ9fp+aceJtdstpjCkEckWkv2/RFdRc28FWOWu5hRNDMsfz2DFn01k96A+Mo+aIjyzgNxZneQcoAFzU/Ka+C4inZmfbbt9tx1rr/8aXOwO4uoUyfp+aPwe3AJt8H+NsmHMwsNGXcxvwlG+5rXKekvkyTuxQtVVOasayN/s+0o//rNgtp+99hwBpvu/9QiDOpjmjgYNA+1rLbJfzbD/0DFWllApBVg/LKKWUCgAtd6WUCkFa7kopFYK03JVSKgRpuSulVAjScldKqRCk5a6UUiFIy10ppULQ/wPc4J223O+wUQAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] @@ -298,7 +361,7 @@ ], "source": [ "# Visualize the mask for a specific trait\n", - "trait_name = 'head'\n", + "trait_name = 'trunk'\n", "plt.imshow(masks_dict[trait_name])" ] }, @@ -1358,19 +1421,19 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 26, "id": "c6a12e38", "metadata": {}, "outputs": [ { - "ename": "TypeError", - "evalue": "landmark_generic() missing 1 required positional argument: 'trait_name'", + "ename": "NameError", + "evalue": "name 'img_seg_2' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "Input \u001b[0;32mIn [45]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mimg_seg_2\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlandmark_generic\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", - "\u001b[0;31mTypeError\u001b[0m: landmark_generic() missing 1 required positional argument: 'trait_name'" + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Input \u001b[0;32mIn [26]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mimg_seg_2\u001b[49m\u001b[38;5;241m.\u001b[39mlandmark_generic()\n", + "\u001b[0;31mNameError\u001b[0m: name 'img_seg_2' is not defined" ] } ], @@ -1628,10 +1691,341 @@ "img_seg_2.measure_body_length()" ] }, + { + "cell_type": "markdown", + "id": "4f5ea07b", + "metadata": {}, + "source": [ + "### My Stuff to play" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "fbcabc0a", + "metadata": {}, + "outputs": [], + "source": [ + "# Example with other image with 2 pevilc fins\n", + "# load the test image, you can add more test image if you have bug related to specific images.\n", + "segmented_file = '/fs/ess/PAS2136/BGNN/Minnows/Segmented/INHS_FISH_00190_segmented.png'\n", + "#segmented_file = '../Test_Data/INHS_FISH_000742_segmented.png'\n", + "img_seg_2 = tc.segmented_image(segmented_file)" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "e95c5da2", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAD/CAIAAACGkiVYAAAUTklEQVR4nO3dbY6jSLqAUa5Vq7gLvJpFpCzLykW0eoF3FS1rfpBFU4BxABEQH+eoNequqsxyMib95Es46DoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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/266v96MJmJlhAfuJOY1p98T9nptXq0YUPBBaQqyiB0Pbrf+rGavvowhqBBeTtSCN4/e+6Lk1mObSwTmAB2dsXCBJgycHYclAhkMACyhFeB0Jgu/HRdfzgIIEFlGY9s6QBkAHfiYCiqCugBL4ZAQBE9uvqBwAQg9kVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqfwXsIwvAwGVwQ4AAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.visualize_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "723edb48", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAD/CAIAAACGkiVYAAAIVklEQVR4nO3d2XLbOBBAUTGV//9lzYOqHI8XiaRAoJdznqcmWoDGDexItxsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAESxrX4AwBr3+/3Qf79txgXAXiYmVHa0ovZQWgAvGZSQ2xUJtYfMAnjCiKSdVUVSldIC+M5kpDg5NYHGAvjCWKQUObWW0gJ4MA1JTE6FpbSA5gxB4tJPhz2yJurrprqAPv6ufgDwP6KqsI83V2kB5QksVpJTPX1+38UWUJLA4nIqiidcawElCSyGEVK84/v6kVxAXgKLk+QUV3usMZkFZCSwOEBUMZ9f2AIyEli8pqsIwi9sAVkILP4RUmTx21oVXkAQAgtdRR1+nggEIbBak1YU5ueJwEICCyhOaQHzGTfducQqJfZ3EcanwIBR3GCVsrOWnCLwoy87yE4BTjM+0jt9Bf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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQ23/xPM6vg/F/UwAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg_2.visualize_major_minor()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "12b4442b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL': 586.0034129593445,\n", + " 'EA': 922,\n", + " 'HAt': 8437.999999999995,\n", + " 'HAp': 16034,\n", + " 'HCL': 'WIP',\n", + " 'ED': 34.262616074167774,\n", + " 'HL': 151.64761785138597,\n", + " 'HD': 158.3161394173064,\n", + " 'pOD': 32.31098884280702}" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.all_measure()" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "bcdc246a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'SL_bbox': (587,),\n", + " 'HL_bbox': 152,\n", + " 'ED_bbox': 31,\n", + " 'HD': 145,\n", + " 'pOD_bbox': 30,\n", + " 'fish_angle': 2.0124973591623814}" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.measure_using_bbox()" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "77b08154", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAZo0lEQVR4nO3dbW6bXBqA4TOoq5gVziIiC1lexGgW+K4isuYHKSGACWDgfF2XqqpJ7ISmrn3nOcc4BAAAAAAAAAAAAAAASMS/Yh8AUIvn4kebi44C4AoCCzjSckUt01hAMQQWsN87OTVLYwFlE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BRgQWi401eMDQWPDSESOrhX6SVpAdgcXAtLR+PmxoLPhy2iLgqKWkFWRKYLHBlYHVkVmkxeYqYB2BxQbXB1ZHZhGZrgI2ElhsE6uxgszieroK2EtgsU3EwOrILE6nq4C3CSw2i95YQWZxBl0FHEdgsUcKjdVRWrxLVwEnEFjskU5gdWQWe0gr4DQCi51Sa6yO0uIXogq4hMBipzQDq6e0GJNWwIUEFvsl3lhBZiGqgEgEFvulH1gdmVUg5QSkTWDxllwaK8is9GkmoCACi3dpLDa430/85E1z4icH2EJg8a6MAitorAs8HuGZwE1CbAFRCSwOoLEqlUhLvaKxgHgEFsfIqLGqCKzRfqZpBv0aHymX03oaC4hEYHGYXBqrtMA6dVdT7gQWEMmf2AdAOZrQ5NJY2RNVAGkTWBxJY72j/fPj/2P7+TlzIWkFkAOBxcE01g6jtBq+8zuzpNVW1geBeAQWx2tCE/LZkhXXbFpNL9Deyto3dgF1BUTlPoizNG5dv/m1rr4vaXy1UtN8/QKIygSLE1ku5HRaCkiS0zRwutQaK5HTNAzHV23b9r/P/uHrTQuFHVEFJM/9FKezVrigbdtxRQ1ia/ShGvVLfsNfAMlzV8UVNNZIP76aBtbStYrZiTWbTVoKKIg9WFzEUwvrpZOA+ggsLtWPspRW4UQVUDd3gsTRLwJd/3XHL4TMmyztAUx4FiEJuWCs9Z10Hx9nf60Fwz1Y4w8NdmXNfPS8JxKqIoDjCCxSdFJpzQzM4mXW+rOMfl+l763n4vdHKgHEZg8WKbpuR/x0ufCa5Ho8wjunYJBQAGkzwSInW5Mr8dNDbDrNlXNiAWTEBIucJB5MANDxcAXRbDjFqPEVQFYsEUJ8C/0krQByJLAgFbMvSggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OP/SIFCPeO9YoQAAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.visualize_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "id": "e8227220", + "metadata": {}, + "outputs": [], + "source": [ + "_, _, _, _, center_eye, _ = img_seg.landmark_generic('eye')\n", + "_, _, _, _, _, new_mask_head = img_seg.landmark_generic('head')\n", + "\n", + "row_eye = round(center_eye[0])\n", + "col_eye = round(center_eye[1])\n", + "# horizontal line\n", + "head_hori_line = new_mask_head[row_eye,:]\n", + "index_hori = np.where(head_hori_line == 1)[0]\n", + "start_h = (row_eye,np.max(index_hori))\n", + "end_h = (row_eye,np.min(index_hori))\n", + "\n", + "# vertical line\n", + "head_verti_line = new_mask_head[:,col_eye]\n", + "index_verti = np.where(head_verti_line == 1)[0]\n", + "start_v = (np.min(index_verti),col_eye)\n", + "end_v = (np.max(index_verti),col_eye)" + ] + }, + { + "cell_type": "code", + "execution_count": 115, + "id": "43a0d2f2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(196, 81, 97, 81)" + ] + }, + "execution_count": 115, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_v + end_v" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "id": "786cf439", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-99\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAATpklEQVR4nO3dUW7bOhaAYVboWgezCKMPhRcxuIv1nQeljps4jiVT5Dnk96HoS9NEtgXzz5EslQIAAAAAAAAAAAAAAEH86L0BwCwuD/91abQVAC0ILKCmxxX1mMYChiGwgP1eyam7NBYwBoEFPKt6Tt2lsYAB/Oy9AUBobaIKYDAmWDC7gAlliAVkJ7BgIgFb6isaC0hNYMGwEuXUXRoLyEtgwVCyR9U+UgyIRmBBenNG1ZO0F9CFwIJk5FRF8gs4iMCCBERVG3oLqEVgQWjSqgulBbxIYEFc6qo7pQXsI7AgHF0VmeQCniGwI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7M0Fhxh1+dRhuwtdZVZqD0y4p4ksKaxo7GOD6yisZhH3csCQ1AtwytiV10JrMlsyqwmgVU0FmPTVczruBUkdFqtBNZ8nm+s87mU0qaxisxiMLoK3tRdRBKk1UpgzerJzNJYsJW0gm98u6akqagHBNb0HpfWn6WiWWMVmUVe0gr4Y4RI5CXPLQlLw13FHXXI53xWV8AtEyxufJ5m/b1mmGPBGzkFPCSw2KBlYK1kFrHoKuA5AosN2gfWSmbRma4CNhJYbNOrsYrMoj1dBewlsNimY2CtZBaH01XAywQWm3VvrCKzOIKuAuoRWOwRobFWSotX6SrgAAKLPeIE1kpmsYe0Ag4jsNgpWmOtlBbfEFVAEwKLnWIG1pXS4iNpBTQksNgveGMVmYWoAjoRWOwXP7BWMmtAygmITWDxkiyNVWRWfJoJGIjA4lUaiw1+/z7wmy/Lgd8cYAuBxasSBVbRWA2cz+USYJcQW0BXAosKNNakgrTUVzQW0I/Aoo5EjTVFYH04n+lzBn0bH5HL6XkaC+hEYFFNlsYaLbAOPaspO4EFdPKz9wYwjqUsWRorPVEFEJvAoiaNdThpBZCBwKIyjXUUabWV44NAPwKL+paylDynZIUmqnZTV0BXAoujGGW9Sl3toKuAGAQWB9JY+6mrJykqICSBxbE01h7q6jFRBYQnsDicxmI/LQXkJLBoQWPxF9kEjE5g0YiPFs5LTgHzEVg0tWZWUVoPjHEClqgC5uZehHTWuLTeCu90avlDn3W9Q3OuGy1rKYBPBBaBNIit6wgtXGNd6+pWy9LSSQD1CCwiOqi03uvqKkJm3U2rxx6Hl1QC6E1gEVf1zLoTWJ+1Sa4dUQVAHgKLTLYm11NFBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAb/8H15IUEBgrp10AAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 117, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from PIL import Image\n", + "img_arr = img_seg.img_arr\n", + "img = Image.fromarray(img_arr)\n", + "img1 = ImageDraw.Draw(img)\n", + "\n", + "line_h = (end_h[1],end_h[0],start_h[1],start_h[0])\n", + "line_v = (end_v[1],end_v[0],start_v[1],start_v[0])\n", + "print(end_v[0]-start_v[0])\n", + "img1.line(line_h, fill=\"red\")\n", + "img1.line(line_v, fill=\"red\")\n", + "img" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "6847b4fb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "145" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "head_depth = np.count_nonzero( head_hori_line)\n", + "head_depth" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "b8d95834", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(800,)\n", + "(315, 800)\n", + "(315, 800, 3)\n" + ] + } + ], + "source": [ + "img_seg.visualize_trait('head')\n", + "print(head_hori_line.shape)\n", + "print(new_mask_head.shape)\n", + "print(img_seg.img_arr.shape)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "ca08de0e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "39" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "index = np.where(head_hori_line == 1)[0]\n", + "np.max(index)\n", + "np.min(index)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "fd4282e4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwY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03epUSqW6/h7r3oqUUkvtVmeLaK0tewNCgANAChAObAcGWFjPOGAYsNPtuSeA5a7Hy4HHXY8HuOqNAHq5/hwhfqgxERjmehwH7HPVYrc6FRDrehwGbABG2a1Ot3rvAf4MfGjHf3fXax8EOpzznB3rfBW41fU4HGhnxzrd6g0BcjFzxm1bZ5P/XJa+OIwGPnH7+H7gfotrSubscN8LJLoeJwJ766sV+AQYbUG97wGT7VwnEA2kAyPtWCdm59LPgTS3cLdjnfWFu63qBNoAWbjG8+xa5zm1TQH+Zfc6m/pmdbdMIBzsYdtDSZRSycBQTKvYdnUG0CEv/wPcCzjdnrNjnRpYo5TaopRaZNM6U4ATwCuubq4XlVIxNqzT3TzgDddjO9fZJFaHu0cHe9iUpbUrpWKBt4GlWuui811az3N+qVP74JAXb1NKXQHkaa23ePol9Tznr3/3MVrrYcB04A6l1LjzXGtVnaGYrs3/01oPxWwrcr6xNKu/j8KBWcBfG7u0nudsnVVWh7tHB3tYrEWHkviCUioME+yva63fsWuddbQXD3nxgTHALKXUQeBNIE0p9Scb1onW+qjrfR7wN8zZxHarMxvIdv2WBvAWJuztVmed6UC61vq462O71tlkVof7JqCvUqqX6yfoPMxhH3Ziq0NJlFIKeAn4Tmv9tI3rDIhDXrTW92utu2utkzH///6ptf6x3epUSsUopeLqHmP6iXfarU6tdS5wRCmV6nrqcszZDraq0831nOmSqavHjnU2ndWd/sAMzIyPA8AvLK7lDeAYUI35Sb0QSMAMtmW43rd3u/4Xrrr3AtP9VONYzK+DO4BtrrcZNqxzELDVVedO4EHX87aq85yaJ3BmQNVWdWL6sre73nbVfa/YrU7X6w4BNrv+7d8F4m1aZzSQD7R1e852dTb3TVaoCiFEELK6W0YIIYQPSLgLIUQQknAXQoggJOEuhBBBSMJdCCGCkIS7EEIEIQl3IYQIQhLuQggRhP4fMnqXgppQQVwAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(img_seg.img_arr)\n" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "c698f93d", + "id": "c3772f3c", "metadata": {}, "outputs": [], "source": [] diff --git a/Scripts/Morphology_main.py b/Scripts/Morphology_main.py index 0fe0a8d..c1ac49c 100755 --- a/Scripts/Morphology_main.py +++ b/Scripts/Morphology_main.py @@ -45,7 +45,10 @@ def main(input_file, metadata_file, output_measure, output_landmark, output_pres output_lm_image=None): img_seg = tc.segmented_image(input_file) - measurement = img_seg.measurement + measurement_bbox = img_seg.measurement_with_bbox + measurement_lm = img_seg.measurement_with_lm + # combine the 2 types of measurement + measurement = {**measurement_bbox, **measurement_lm} landmark = img_seg.landmark presence_matrix = img_seg.presence_matrix diff --git a/Scripts/Traits_class.py b/Scripts/Traits_class.py index 45f6e90..cf8712c 100644 --- a/Scripts/Traits_class.py +++ b/Scripts/Traits_class.py @@ -25,22 +25,25 @@ def __init__(self, file_name): 'trunk': [0, 124, 124]} self.img_arr = self.import_image(file_name) self.get_channels_mask() + self.fish_angle = self.get_fish_angle() self.presence_matrix = self.get_presence_matrix() self.landmark = self.all_landmark() - self.measurement = self.all_measure() + self.measurement_with_bbox = self.measure_using_bbox() + self.measurement_with_lm = self.measure_using_lm() + def import_image(self,file_name): ''' - import the image from "image_path" and convert to np.array astype uint8 (0-255) + Import the image from "image_path" and convert to np.array astype uint8 (0-255) ''' img = Image.open(file_name) img_arr = np.array(img, dtype=np.uint8) return img_arr - def get_channels_mask(self): - ''' Convert the png image (numpy.ndarray, np.uint8) (320, 800, 3) + ''' + Convert the png image (numpy.ndarray, np.uint8) (320, 800, 3) to a mask_channel (320, 800, 12) Binary map input @@ -61,20 +64,34 @@ def get_channels_mask(self): mask[trait]=trait_mask.astype("uint8") self.mask = mask - + + def get_fish_angle(self): + ''' + Calculate orientation (PCA) of the mask of head + eye + trunk + We choose to combine only head eye and trunk because they are the most reliable feature, fins can bias the measurement of the + orientation. + return value in degree + ''' + angle_deg = "None" + head_eye_trunk = self.combine_trait_mask(['head','eye','trunk']) + if np.any(head_eye_trunk): + + trait_region = self.clean_trait_region(head_eye_trunk) + angle_rad = trait_region.orientation + angle_deg = (90-angle_rad*180/math.pi) + + return angle_deg + def align_fish(self): ''' - development + Development To align the fish horizontally in order to get landmark 5 and 6 ''' img_arr = self.img_arr - traits_to_combine = list(self.trait_color_dict.keys())[1:] - combine_mask = self.combine_trait_mask(traits_to_combine) - region = self.clean_trait_region(combine_mask) - angle_rad = region.orientation - angle_deg = (90-angle_rad*180/math.pi) + angle_deg = self.fish_angle + image_align = Image.fromarray(img_arr).rotate(angle_deg) return image_align @@ -99,7 +116,7 @@ def remove_holes(self, image): return filled - def clean_trait_region(self, trait_mask, percent_cut = 0.5): + def clean_trait_region(self, trait_mask, percent_cut = 0.95): ''' Clean the mask_trait (remove holes) Find the biggest region @@ -214,54 +231,10 @@ def combine_trait_mask(self, list_trait=['head','trunk']): #combo_cleaned = self.remove_holes(combo) return combo - - def get_body_len(self): - ''' - body length from snout to back to the trunk - 1- Combine head and trunk - 2- Create a clean trait region clean_trait_region - 3- Measure distance long axis, bbox - ''' - head_trunk = self.combine_trait_mask() - trait_region= self.clean_trait_region(head_trunk) - orientation = trait_region.orientation - xb0, yb0, xb1, yb1 = trait_region.bbox - len1 =(yb1-yb0)/math.sin(orientation) - bbox_len = yb1-yb0 - return len1, bbox_len - - def visualize_major_minor(self): - - trait_mask = self.combine_trait_mask() - trait_region= self.clean_trait_region(trait_mask) - x0, y0 = trait_region.centroid - orientation = trait_region.orientation - xb0, yb0, xb1, yb1 = trait_region.bbox - - # Drawing object - # Create rgb image - trait_mask_rgb = np.stack((trait_mask, trait_mask, trait_mask), axis=2) - #R = np.repeat(mask_line[:,:,np.newaxis],3, axis=2) - img = Image.fromarray(trait_mask_rgb*255) - img1 = ImageDraw.Draw(img) - - # Long axis - x2 = x0 - 0.5 * (yb1-yb0)/math.tan(orientation) - x1 = x0 + 0.5 * (yb1-yb0)/math.tan(orientation) - long_axis = [(yb0, x2), (yb1, x1)] - img1.line(long_axis, fill ="red", width = 2) - - # Short axis - x1t = x0 + math.sin(orientation) * 0.5 * trait_region.axis_minor_length - y1t = y0 - math.cos(orientation) * 0.5 * trait_region.axis_minor_length - short_axis = [(y0, x0), (y1t, x1t)] #img1.line(shape1, fill ="red", width = 2) - img1.line(short_axis, fill ="red", width = 2) - - # Display the image created - img.show() - - +####################### +# Measure the landamrks +####################### def landmark_generic(self, trait_name): ''' Identify landmark of a trait (trait_name) @@ -359,13 +332,16 @@ def all_landmark(self): # reorder the key new_landmark={} - list_order = [str(i) for i in range(1,16)] + list_order = [str(i) for i in range(1,19)] for key in list_order: new_landmark[key] = landmark[key] return new_landmark - +#################################### +# Calculate measurements using landmarks +#################################### + def measure_eye_area(self): ''' Calculate eye area after cleaning and filing hole @@ -404,8 +380,7 @@ def measure_eye_head_ratio(self): eye_head_ratio = eye_area/head_area return eye_head_ratio - - + def measure_eye_diameter(self): ''' Calculate eye equivalent diameter : diameter of the disk of the same area @@ -442,42 +417,50 @@ def calculate_triangle_area(self, point_1, point_2, point_3): area = (s*(s-a)*(s-b)*(s-c)) ** 0.5 return area - def measure_head_depth(self): + def measure_head_length(self): ''' - Measure vertical length of the head passing by the center of the eye + Measure horizontal length of the head passing by the center of the eye ''' #eye _, _, _, _, center_eye, _ = self.landmark_generic('eye') # head _, _, _, _, _, new_mask_head = self.landmark_generic('head') - # landmark 15 # head length, vertical line of the head passing by the center of the eye row_eye = round(center_eye[0]) head_hori_line = new_mask_head[row_eye,:] - head_depth = np.count_nonzero( head_hori_line) - - return head_depth - - def measure_head_depth_2(self): + index_hori = np.where(head_hori_line == 1)[0] + + # Get start and end of the horizontal line to check + start_h = (row_eye,np.max(index_hori)) + end_h = (row_eye,np.min(index_hori)) + + head_length = np.count_nonzero( head_hori_line) + + return head_length, start_h, end_h + + def measure_head_depth(self): ''' - Measure height of bbox + Measure horizontal length of the head passing by the center of the eye ''' #eye _, _, _, _, center_eye, _ = self.landmark_generic('eye') - # head _, _, _, _, _, new_mask_head = self.landmark_generic('head') - # landmark 15 - # head length, vertical line of the head passing by the center of the eye - row_eye = round(center_eye[0]) - head_hori_line = new_mask_head[row_eye,:] - head_depth = np.count_nonzero( head_hori_line) - - return head_depth + # head depth, horizontal line of the head passing by the center of the eye + col_eye = round(center_eye[1]) + + head_vert_line = new_mask_head[:,col_eye] + + index_verti = np.where(head_vert_line == 1)[0] + start_v = (np.max(index_verti),col_eye) + end_v = (np.min(index_verti),col_eye) + + head_depth = np.count_nonzero(head_vert_line) + return head_depth, start_v, end_v def measure_body_length(self): ''' @@ -495,6 +478,84 @@ def measure_body_length(self): body_length = yb1-yb0 return body_length + + def measure_using_lm(self): + ''' + Collect all the measurment for the fish that using mainly landmarks + ''' + landmark = self.landmark + measure={'SL_lm':'None', 'EA':'None', 'HA':'None', 'ED':'None', 'HL_lm':'None', 'pOD_lm':'None' } + # Standard Length (body length) + if landmark['1'] and landmark['6']: + measure['SL_lm'] = self.get_distance(landmark['1'],landmark['6']) + # Eye Area + measure['EA'] = int(self.measure_eye_area()) + # Head area + measure['HA'] = self.measure_head_area() + # Eye Diameter + measure['ED'] = self.measure_eye_diameter() + # Head Length + if landmark['1'] and landmark['12']: + measure['HL_lm'] = self.get_distance(landmark['1'],landmark['12']) + # preObital Depth + if landmark['1']and landmark['14']: + measure['pOD_lm'] = self.get_distance(landmark['1'],landmark['14']) + + return measure + +######################## +# Measurement using bbox +######################## + + def measure_SL_bbox(self): + ''' + Measure SL (Standard Length), length of the bounding box of head + trunk + Combine head and trunk and measure bbox length + ''' + standard_length = "None" + head_eye_trunk = self.combine_trait_mask(['head','eye','trunk']) + if np.any(head_eye_trunk): + + trait_region= self.clean_trait_region(head_eye_trunk) + min_row, min_col, max_row, max_col = trait_region.bbox # (up, left, bottom, right) <=> (min_row, min_col, max_row, max_col) + standard_length = max_col-min_col + + return standard_length + + def measure_length_bbox(self, trait_name): + ''' + Measure the length of bbox of the trait_name + ''' + mask = self.mask[trait_name] + # remove the hole and take the biggest blob + trait_region = self.clean_trait_region(mask) + trait_length_bbox = "None" + + if trait_region: + minrow, mincol, maxrow, maxcol = trait_region.bbox + + trait_length_bbox = maxcol-mincol + + return trait_length_bbox + + def measure_pOD_bbox(self): + ''' + Measure preorbital Depth using left boubdary of bbox of head and eye + ''' + pOD_bbox = "None" + mask_head = self.mask['head'] + mask_eye = self.mask['eye'] + head_region = self.clean_trait_region(mask_head) + eye_region = self.clean_trait_region(mask_eye) + + if head_region and eye_region: + + up_h, left_h, bot_h, right_h = head_region.bbox + up_e, left_e, bot_e, right_e = eye_region.bbox + + pOD_bbox = int(left_e - left_h) + + return pOD_bbox def measure_body_depth(self): ''' @@ -509,43 +570,35 @@ def measure_body_depth(self): return body_depth - def all_measure(self): + def measure_using_bbox(self): ''' - Collect all the measurment for the fish + Collect the measurment for the fish for Meghan paper ''' - landmark = self.landmark - measure={'SL':'None', 'EA':'None', 'HAt':'None', 'HAp':'None', 'HCL':'None', 'ED':'None', 'HL':'None', 'HD':'None','pOD':'None', } - # Standard Length (body length) - if landmark['1'] and landmark['6']: - measure['SL'] = self.get_distance(landmark['1'],landmark['6']) - # Eye Area - measure['EA'] = int(self.measure_eye_area()) - # Head Area triangle - if landmark['1'] and landmark['2'] and landmark['13']: - measure['HAt'] = self.calculate_triangle_area(landmark['1'],landmark['2'],landmark['13']) - # Head area - measure['HAp'] = self.measure_head_area() - # Head to caudal line - measure['HCL'] = "WIP" - # Eye Diameter - measure['ED'] = self.measure_eye_diameter() - # Head Length - if landmark['1'] and landmark['12']: - measure['HL'] = self.get_distance(landmark['1'],landmark['12']) - # Head Depth - if landmark['2'] and landmark['13']: - measure['HD'] = self.get_distance(landmark['2'],landmark['13']) - # preObital Depth - if landmark['1']and landmark['14']: - measure['pOD'] = self.get_distance(landmark['1'],landmark['14']) - # Body length - measure['BL'] = self.measure_body_length() + measure={'SL_bbox':'None', 'HL_bbox':'None', 'ED_bbox':'None', 'HD_eye':'None','pOD_bbox':'None' } - # Body depth - measure['BD'] = self.measure_body_depth() - - return measure + # SL standart length, length bbox of head+trunk + + measure['SL_bbox'] = self.measure_SL_bbox() + # HL Head Length, length of bbox of the head + measure['HL_bbox'] = self.measure_length_bbox('head') + # ED Eye Diameter + measure['ED_bbox'] = self.measure_length_bbox('eye') + # Head Depth, height of the line going through the middle of the eye + measure['HD_eye'], start, end = self.measure_head_depth() + + # preorbital Depth + measure['pOD_bbox'] = self.measure_pOD_bbox() + + # fish angle in case of connection + measure['fish_angle'] = self.fish_angle + + return measure + +############################ +# Visualization function +############################ + def visualize_landmark(self): landmark = self.all_landmark() @@ -559,32 +612,82 @@ def visualize_landmark(self): for i,(k,v) in enumerate(landmark.items()): if v: - x,y = v - xy = [(y-9,x-9),(y+9,x+9)] + row,col = v + xy = [(col-9,row-9),(col+9,row+9)] img1.ellipse(xy, fill='gray', outline=None, width=1) - img1.text((y-6, x-6), k, font=fnt, fill='black') + img1.text((col-6, row-6), k, font=fnt, fill='black') # Display the image created return img def visualize_a_bbox(self, trait_name): + + # creating new Image object + img_arr = self.img_arr + img = Image.fromarray(img_arr) + img1 = ImageDraw.Draw(img) - + # prepare the bbox for the "trait_name" trait_prop = self.clean_trait_region(self.mask[trait_name]) top, left, bottom, right = trait_prop.bbox shape = [(left, top), (right,bottom)] - + + # create rectangle image + img1.rectangle(shape, outline ="red") + + # Display the image created + return img + + def visualize_multi_bbox(self, list_trait_name): + # creating new Image object img_arr = self.img_arr img = Image.fromarray(img_arr) img1 = ImageDraw.Draw(img) - - # create rectangle image - img1 = ImageDraw.Draw(img) - img1.rectangle(shape, outline ="red") + + for trait_name in list_trait_name: + + # prepare the bbox for the "trait_name" + trait_prop = self.clean_trait_region(self.mask[trait_name]) + top, left, bottom, right = trait_prop.bbox + + shape = [(left, top), (right,bottom)] + + # create rectangle image + img1.rectangle(shape, outline ="red") # Display the image created return img + def visualize_major_minor(self): + + trait_mask = self.combine_trait_mask() + trait_region= self.clean_trait_region(trait_mask) + x0, y0 = trait_region.centroid + orientation = trait_region.orientation + xb0, yb0, xb1, yb1 = trait_region.bbox + + # Drawing object + # Create rgb image + trait_mask_rgb = np.stack((trait_mask, trait_mask, trait_mask), axis=2) + #R = np.repeat(mask_line[:,:,np.newaxis],3, axis=2) + img = Image.fromarray(trait_mask_rgb*255) + img1 = ImageDraw.Draw(img) + + # Long axis + x2 = x0 - 0.5 * (yb1-yb0)/math.tan(orientation) + x1 = x0 + 0.5 * (yb1-yb0)/math.tan(orientation) + long_axis = [(yb0, x2), (yb1, x1)] + img1.line(long_axis, fill ="red", width = 2) + + + # Short axis + x1t = x0 + math.sin(orientation) * 0.5 * trait_region.axis_minor_length + y1t = y0 - math.cos(orientation) * 0.5 * trait_region.axis_minor_length + short_axis = [(y0, x0), (y1t, x1t)] #img1.line(shape1, fill ="red", width = 2) + img1.line(short_axis, fill ="red", width = 2) + + # Display the image created + return img From 8bbf635664b932e190876e81a9659e5ec3f1faf1 Mon Sep 17 00:00:00 2001 From: Thibault Tabarin Date: Fri, 15 Jul 2022 18:45:16 -0400 Subject: [PATCH 2/4] fix bug relate to missing traits cases --- .../Morphology_dev-checkpoint.ipynb | 271 +++++++++++++++--- Scripts/Morphology_dev.ipynb | 271 +++++++++++++++--- Scripts/Traits_class.py | 155 +++++----- 3 files changed, 553 insertions(+), 144 deletions(-) diff --git a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb index 8f7544c..5e4ec31 100644 --- a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb +++ b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 80, "id": "602dc370", "metadata": {}, "outputs": [ @@ -31,7 +31,7 @@ "" ] }, - "execution_count": 42, + "execution_count": 80, "metadata": {}, "output_type": "execute_result" } @@ -52,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 81, "id": "e620246b", "metadata": {}, "outputs": [], @@ -65,15 +65,24 @@ }, { "cell_type": "code", - "execution_count": 44, - "id": "2289de98", + "execution_count": 82, + "id": "8a2dae3d", "metadata": {}, "outputs": [], "source": [ "# Create the object segmented image create by the class during initialisation\n", - "img_seg = tc.segmented_image(segmented_file)\n", - "\n", - "# oupput the variables create at initialization time\n", + "img_seg = tc.segmented_image(segmented_file)" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "id": "2289de98", + "metadata": {}, + "outputs": [], + "source": [ + "# output the variables create at initialization time\n", + "img_seg.get_all_measures_landmarks()\n", "measure_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", "measure_lm = img_seg.measurement_with_lm # measurement using bbox\n", "landmark = img_seg.landmark\n", @@ -96,7 +105,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 85, "id": "ae9eb407", "metadata": {}, "outputs": [ @@ -116,19 +125,19 @@ " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" ] }, - "execution_count": 38, + "execution_count": 85, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# presence dictionnary\n", - "presence_matrix\n" + "presence_matrix" ] }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 86, "id": "b24d03d1", "metadata": {}, "outputs": [ @@ -143,7 +152,7 @@ " 'fish_angle': 2.0124973591623814}" ] }, - "execution_count": 45, + "execution_count": 86, "metadata": {}, "output_type": "execute_result" } @@ -155,24 +164,22 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 87, "id": "e5d892d3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'SL_lm': 586.0034129593445,\n", + "{'SL_lm': 586.0,\n", " 'EA': 922,\n", - " 'HAt_lm': 8437.999999999995,\n", - " 'HAp': 16034,\n", - " 'ED': 34.262616074167774,\n", - " 'HL_lm': 151.64761785138597,\n", - " 'HD_lm': 158.3161394173064,\n", - " 'pOD_lm': 32.31098884280702}" + " 'HA': 16034,\n", + " 'ED': 34.26,\n", + " 'HL_lm': 151.65,\n", + " 'pOD_lm': 32.31}" ] }, - "execution_count": 46, + "execution_count": 87, "metadata": {}, "output_type": "execute_result" } @@ -184,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 88, "id": "fe50c813", "metadata": {}, "outputs": [ @@ -197,17 +204,15 @@ " 'HD_eye': 100,\n", " 'pOD_bbox': 30,\n", " 'fish_angle': 2.0124973591623814,\n", - " 'SL_lm': 586.0034129593445,\n", + " 'SL_lm': 586.0,\n", " 'EA': 922,\n", - " 'HAt_lm': 8437.999999999995,\n", - " 'HAp': 16034,\n", - " 'ED': 34.262616074167774,\n", - " 'HL_lm': 151.64761785138597,\n", - " 'HD_lm': 158.3161394173064,\n", - " 'pOD_lm': 32.31098884280702}" + " 'HA': 16034,\n", + " 'ED': 34.26,\n", + " 'HL_lm': 151.65,\n", + " 'pOD_lm': 32.31}" ] }, - "execution_count": 54, + "execution_count": 88, "metadata": {}, "output_type": "execute_result" } @@ -219,7 +224,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 89, "id": "ffda5440", "metadata": {}, "outputs": [ @@ -246,7 +251,7 @@ " '18': (135, 81)}" ] }, - "execution_count": 7, + "execution_count": 89, "metadata": {}, "output_type": "execute_result" } @@ -258,7 +263,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 90, "id": "8b7d1b1a", "metadata": {}, "outputs": [ @@ -269,7 +274,7 @@ "" ] }, - "execution_count": 15, + "execution_count": 90, "metadata": {}, "output_type": "execute_result" } @@ -2024,10 +2029,204 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 91, "id": "c3772f3c", "metadata": {}, "outputs": [], + "source": [ + "list_error = ['INHS_FISH_9066', 'INHS_FISH_23706' ]\n", + "segmented_file = '/fs/ess/PAS2136/BGNN/Minnows/Segmented/INHS_FISH_23706_segmented.png'\n", + "# Create the object segmented image create by the class during initialisation\n", + "img_seg = tc.segmented_image(segmented_file)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "id": "01309abd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 92, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACECAYAAABrsWv9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAjYUlEQVR4nO2deXzU1bn/32fWkAVCEqKBxCRsIlCQfccNEVncwQWrIsrVurbetlLv1dLbHz+1Ra5Wey9arbXuWxU3FkWsdUFQECUh7EsgJEBCCNln5tw/zgRCyDKTzJbJ8369zuv7nfNdzjNZPt/zfc5znqO01giCIAjRhSXcBgiCIAiBR8RdEAQhChFxFwRBiEJE3AVBEKIQEXdBEIQoRMRdEAQhCgmauCulpiil8pRS25RS9werHUEQBOFUVDDi3JVSVmALcCGQD6wFrtVa5wS8MUEQBOEUgtVzHwls01rv0FrXAK8ClwapLUEQBKEBtiDdtwewt97nfGBU/ROUUvOAed6Pw4JkhyAIQjRzSGvdrbEDwRJ31UjdSf4frfXTwNMASinJgSAIguA/u5s6ECy3TD6QUe9zOrA/SG0JgiAIDQiWuK8F+iilspVSDuAaYGmQ2hIEQRAaEBS3jNbapZS6E1gOWIHntNabgtGWIAiCcCpBCYX02wjxuQuCILSGb7XWwxs7EKwBVSHYWPzwqDmdcPrpvp1bXg6HDvl2rtamCIIQcYi4t0cGDoQRI8Bu9+18ux0SE307t7oajh717dyiIsjPh127zEOhstK36wRBCDoi7mGiW7dupKWlHf+cnp7OtGnTTjkvNzeXFStWsHXrVo670EaMgB49gmNYTIwpvpCaCgMGmAdCVRXs2HFyT766GnJzwe0GlwuKi4NjsyAIpyDiHmQcDgd9+vShb9++AHTt2pVrrrmGM844g549ex4/TymFxWJBqZOnCHg8HsrKynjooYf429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4E+Sqls7xP0GmBpmG1qyFLgRu/+jRgfd139NUopp1IqG+gDfBNsY5RSCngWyNVaPxbBdnZTSiV69zsBk4DNkWan1nq+1jpda52F+ftbpbW+PtLsVErFKaUS6vYxfuIfI81OrfUBYK9S6kxv1QVATqTZWY9rOeGSqbMnEu30n3A7/YGpmIiP7cADYbblFaAAqMU8qecCyZjBtq3ebVK98x/w2p0HXBwiG8djXgc3Ahu8ZWoE2jkIWO+180fgQW99RNnZwOZzOTGgGlF2YnzZ33vLprr/lUiz09vu2cA67+/+HaBrhNoZCxwGutSrizg7W1sk/YAgCEIUEm63jCAIghAERNwFQRCiEBF3QRCEKETEXRAEIQoRcRcEQYhCRNwFQRCiEBF3QRCEKOT/AEt9aGoUtE7RAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(img_seg.img_arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "id": "11f3ee8a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[]" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.clean_trait_region(img_seg.mask['eye'])" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "29589a93", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'dorsal_fin': {'number': 1, 'percentage': 1.0},\n", + " 'adipos_fin': {'number': 0, 'percentage': 0},\n", + " 'caudal_fin': {'number': 1, 'percentage': 1.0},\n", + " 'anal_fin': {'number': 2, 'percentage': 0.9988925802879292},\n", + " 'pelvic_fin': {'number': 2, 'percentage': 0.5025803890432712},\n", + " 'pectoral_fin': {'number': 1, 'percentage': 1.0},\n", + " 'head': {'number': 1, 'percentage': 1.0},\n", + " 'eye': {'number': 2, 'percentage': 0.9402677651905252},\n", + " 'caudal_fin_ray': {'number': 0, 'percentage': 0},\n", + " 'alt_fin_ray': {'number': 0, 'percentage': 0},\n", + " 'trunk': {'number': 2, 'percentage': 0.9578356521507808}}" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.get_presence_matrix()" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "id": "febd9a15", + "metadata": {}, + "outputs": [], + "source": [ + "img_seg.get_all_measures_landmarks()" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "id": "908fed32", + "metadata": {}, + "outputs": [], + "source": [ + "# output the variables create at initialization time\n", + "measure_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", + "measure_lm = img_seg.measurement_with_lm # measurement using bbox\n", + "landmark = img_seg.landmark\n", + "presence_matrix = img_seg.presence_matrix\n", + "img_landmark = img_seg.visualize_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "id": "459e6fca", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'1': (78, 48),\n", + " '2': (20, 164),\n", + " '3': (29, 335),\n", + " '4': (71, 450),\n", + " '5': (111, 603),\n", + " '6': (141, 627),\n", + " '7': (162, 571),\n", + " '8': (153, 436),\n", + " '9': (153, 433),\n", + " '10': [],\n", + " '11': (103, 200),\n", + " '12': (75, 204),\n", + " '13': (115, 153),\n", + " '14': (56, 101),\n", + " '15': (52, 136),\n", + " '16': (37, 120),\n", + " '17': (70, 119),\n", + " '18': (54, 119)}" + ] + }, + "execution_count": 103, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "landmark" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "id": "96b1c13c", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAADpCAIAAABTHcTeAAAVFUlEQVR4nO3dXW7iSBuA0RqrV/GtcBYRIYSyiF7hrCJC34UTYmwwZeOft8rnqC8yGUgTOiFP3irbKQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAqv7Z+wGwhfP5PPKfAMCyBFblRlpKZg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kC6zGl9b6yv7TKfvQA9CmeEJy89H1lR6oJFsABrDHWUnJzlB0NOynyK01gARzJgqUlsN6itCYp74tNYAEcz/uZpa4Wo7QyFfYlJ7AAIAix9VIxmSWwACAapTWugMwSWAAQltIaETqzBBYABCeznonbWAILAEqhtIaCNpbAAoASia2biI0lsACgXDKrFa6xBBYAlE5mpWiNJbAAoBoHL61AjRXooQAA73GF6ShMsACgVkcbaAWKS4EFAEdwkNiK0lhRHgcAsCarh5sywQKAA6p4oBWiI0M8CABgWwJgXSZYAHBklY2yooSjwAIAWhXEVpTAivI4AIC9lV4FgR6/CRYA0FPuKCtKYwksAOCZ4kpLYAEAZSgrs0I0lsACAPLFj60QgRXiQQAAhVAOWTxNAMAkrrrzmiVCAOB9QZYOo5RflMcBAJRMUdwxwQIAFrTjKCtQ5AksAGA9m/VWoLpKAgsA2MSqpRWrrpLAAgB28n5yheuqG4EFAEQwqbfiplVLYAEAYQ2rK3paAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACX6PwiJZDZlA/mPAAAAAElFTkSuQmCC\n", + "text/plain": [ + "" + ] + }, + "execution_count": 104, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_landmark" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "id": "17302639", + "metadata": {}, + "outputs": [], + "source": [ + "img_seg.cutoff =0.9" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d5fd2718", + "metadata": {}, + "outputs": [], "source": [] } ], diff --git a/Scripts/Morphology_dev.ipynb b/Scripts/Morphology_dev.ipynb index 8f7544c..5e4ec31 100644 --- a/Scripts/Morphology_dev.ipynb +++ b/Scripts/Morphology_dev.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 80, "id": "602dc370", "metadata": {}, "outputs": [ @@ -31,7 +31,7 @@ "" ] }, - "execution_count": 42, + "execution_count": 80, "metadata": {}, "output_type": "execute_result" } @@ -52,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 81, "id": "e620246b", "metadata": {}, "outputs": [], @@ -65,15 +65,24 @@ }, { "cell_type": "code", - "execution_count": 44, - "id": "2289de98", + "execution_count": 82, + "id": "8a2dae3d", "metadata": {}, "outputs": [], "source": [ "# Create the object segmented image create by the class during initialisation\n", - "img_seg = tc.segmented_image(segmented_file)\n", - "\n", - "# oupput the variables create at initialization time\n", + "img_seg = tc.segmented_image(segmented_file)" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "id": "2289de98", + "metadata": {}, + "outputs": [], + "source": [ + "# output the variables create at initialization time\n", + "img_seg.get_all_measures_landmarks()\n", "measure_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", "measure_lm = img_seg.measurement_with_lm # measurement using bbox\n", "landmark = img_seg.landmark\n", @@ -96,7 +105,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 85, "id": "ae9eb407", "metadata": {}, "outputs": [ @@ -116,19 +125,19 @@ " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" ] }, - "execution_count": 38, + "execution_count": 85, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# presence dictionnary\n", - "presence_matrix\n" + "presence_matrix" ] }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 86, "id": "b24d03d1", "metadata": {}, "outputs": [ @@ -143,7 +152,7 @@ " 'fish_angle': 2.0124973591623814}" ] }, - "execution_count": 45, + "execution_count": 86, "metadata": {}, "output_type": "execute_result" } @@ -155,24 +164,22 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 87, "id": "e5d892d3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'SL_lm': 586.0034129593445,\n", + "{'SL_lm': 586.0,\n", " 'EA': 922,\n", - " 'HAt_lm': 8437.999999999995,\n", - " 'HAp': 16034,\n", - " 'ED': 34.262616074167774,\n", - " 'HL_lm': 151.64761785138597,\n", - " 'HD_lm': 158.3161394173064,\n", - " 'pOD_lm': 32.31098884280702}" + " 'HA': 16034,\n", + " 'ED': 34.26,\n", + " 'HL_lm': 151.65,\n", + " 'pOD_lm': 32.31}" ] }, - "execution_count": 46, + "execution_count": 87, "metadata": {}, "output_type": "execute_result" } @@ -184,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 88, "id": "fe50c813", "metadata": {}, "outputs": [ @@ -197,17 +204,15 @@ " 'HD_eye': 100,\n", " 'pOD_bbox': 30,\n", " 'fish_angle': 2.0124973591623814,\n", - " 'SL_lm': 586.0034129593445,\n", + " 'SL_lm': 586.0,\n", " 'EA': 922,\n", - " 'HAt_lm': 8437.999999999995,\n", - " 'HAp': 16034,\n", - " 'ED': 34.262616074167774,\n", - " 'HL_lm': 151.64761785138597,\n", - " 'HD_lm': 158.3161394173064,\n", - " 'pOD_lm': 32.31098884280702}" + " 'HA': 16034,\n", + " 'ED': 34.26,\n", + " 'HL_lm': 151.65,\n", + " 'pOD_lm': 32.31}" ] }, - "execution_count": 54, + "execution_count": 88, "metadata": {}, "output_type": "execute_result" } @@ -219,7 +224,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 89, "id": "ffda5440", "metadata": {}, "outputs": [ @@ -246,7 +251,7 @@ " '18': (135, 81)}" ] }, - "execution_count": 7, + "execution_count": 89, "metadata": {}, "output_type": "execute_result" } @@ -258,7 +263,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 90, "id": "8b7d1b1a", "metadata": {}, "outputs": [ @@ -269,7 +274,7 @@ "" ] }, - "execution_count": 15, + "execution_count": 90, "metadata": {}, "output_type": "execute_result" } @@ -2024,10 +2029,204 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 91, "id": "c3772f3c", "metadata": {}, "outputs": [], + "source": [ + "list_error = ['INHS_FISH_9066', 'INHS_FISH_23706' ]\n", + "segmented_file = '/fs/ess/PAS2136/BGNN/Minnows/Segmented/INHS_FISH_23706_segmented.png'\n", + "# Create the object segmented image create by the class during initialisation\n", + "img_seg = tc.segmented_image(segmented_file)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "id": "01309abd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 92, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACECAYAAABrsWv9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAjYUlEQVR4nO2deXzU1bn/32fWkAVCEqKBxCRsIlCQfccNEVncwQWrIsrVurbetlLv1dLbHz+1Ra5Wey9arbXuWxU3FkWsdUFQECUh7EsgJEBCCNln5tw/zgRCyDKTzJbJ8369zuv7nfNdzjNZPt/zfc5znqO01giCIAjRhSXcBgiCIAiBR8RdEAQhChFxFwRBiEJE3AVBEKIQEXdBEIQoRMRdEAQhCgmauCulpiil8pRS25RS9werHUEQBOFUVDDi3JVSVmALcCGQD6wFrtVa5wS8MUEQBOEUgtVzHwls01rv0FrXAK8ClwapLUEQBKEBtiDdtwewt97nfGBU/ROUUvOAed6Pw4JkhyAIQjRzSGvdrbEDwRJ31UjdSf4frfXTwNMASinJgSAIguA/u5s6ECy3TD6QUe9zOrA/SG0JgiAIDQiWuK8F+iilspVSDuAaYGmQ2hIEQRAaEBS3jNbapZS6E1gOWIHntNabgtGWIAiCcCpBCYX02wjxuQuCILSGb7XWwxs7EKwBVSHYWPzwqDmdcPrpvp1bXg6HDvl2rtamCIIQcYi4t0cGDoQRI8Bu9+18ux0SE307t7oajh717dyiIsjPh127zEOhstK36wRBCDoi7mGiW7dupKWlHf+cnp7OtGnTTjkvNzeXFStWsHXrVo670EaMgB49gmNYTIwpvpCaCgMGmAdCVRXs2HFyT766GnJzwe0GlwuKi4NjsyAIpyDiHmQcDgd9+vShb9++AHTt2pVrrrmGM844g549ex4/TymFxWJBqZOn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utC7+dItdNvwi3ua4E+Sqls7xP0GmBpmG1qyFLgRu/+jRgfd139NUopp1IqG+gDfBNsY5RSCngWyNVaPxbBdnZTSiV69zsBk4DNkWan1nq+1jpda52F+ftbpbW+PtLsVErFKaUS6vYxfuIfI81OrfUBYK9S6kxv1QVATqTZWY9rOeGSqbMnEu30n3A7/YGpmIiP7cADYbblFaAAqMU8qecCyZjBtq3ebVK98x/w2p0HXBwiG8djXgc3Ahu8ZWoE2jkIWO+180fgQW99RNnZwOZzOTGgGlF2YnzZ33vLprr/lUiz09vu2cA67+/+HaBrhNoZCxwGutSrizg7W1sk/YAgCEIUEm63jCAIghAERNwFQRCiEBF3QRCEKETEXRAEIQoRcRcEQYhCRNwFQRCiEBF3QRCEKOT/AEt9aGoUtE7RAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(img_seg.img_arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "id": "11f3ee8a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[]" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.clean_trait_region(img_seg.mask['eye'])" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "29589a93", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'dorsal_fin': {'number': 1, 'percentage': 1.0},\n", + " 'adipos_fin': {'number': 0, 'percentage': 0},\n", + " 'caudal_fin': {'number': 1, 'percentage': 1.0},\n", + " 'anal_fin': {'number': 2, 'percentage': 0.9988925802879292},\n", + " 'pelvic_fin': {'number': 2, 'percentage': 0.5025803890432712},\n", + " 'pectoral_fin': {'number': 1, 'percentage': 1.0},\n", + " 'head': {'number': 1, 'percentage': 1.0},\n", + " 'eye': {'number': 2, 'percentage': 0.9402677651905252},\n", + " 'caudal_fin_ray': {'number': 0, 'percentage': 0},\n", + " 'alt_fin_ray': {'number': 0, 'percentage': 0},\n", + " 'trunk': {'number': 2, 'percentage': 0.9578356521507808}}" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.get_presence_matrix()" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "id": "febd9a15", + "metadata": {}, + "outputs": [], + "source": [ + "img_seg.get_all_measures_landmarks()" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "id": "908fed32", + "metadata": {}, + "outputs": [], + "source": [ + "# output the variables create at initialization time\n", + "measure_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", + "measure_lm = img_seg.measurement_with_lm # measurement using bbox\n", + "landmark = img_seg.landmark\n", + "presence_matrix = img_seg.presence_matrix\n", + "img_landmark = img_seg.visualize_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "id": "459e6fca", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'1': (78, 48),\n", + " '2': (20, 164),\n", + " '3': (29, 335),\n", + " '4': (71, 450),\n", + " '5': (111, 603),\n", + " '6': (141, 627),\n", + " '7': (162, 571),\n", + " '8': (153, 436),\n", + " '9': (153, 433),\n", + " '10': [],\n", + " '11': (103, 200),\n", + " '12': (75, 204),\n", + " '13': (115, 153),\n", + " '14': (56, 101),\n", + " '15': (52, 136),\n", + " '16': (37, 120),\n", + " '17': (70, 119),\n", + " '18': (54, 119)}" + ] + }, + "execution_count": 103, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "landmark" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "id": "96b1c13c", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAADpCAIAAABTHcTeAAAVFUlEQVR4nO3dXW7iSBuA0RqrV/GtcBYRIYSyiF7hrCJC34UTYmwwZeOft8rnqC8yGUgTOiFP3irbKQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAqv7Z+wGwhfP5PPK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hV8V/XQksgLpsnFkC6zGl9b6yv7TKfvQA9CmeEJy89H1lR6oJFsABrDHWUnJzlB0NOynyK01gARzJgqUlsN6itCYp74tNYAEcz/uZpa4Wo7QyFfYlJ7AAIAix9VIxmSWwACAapTWugMwSWAAQltIaETqzBBYABCeznonbWAILAEqhtIaCNpbAAoASia2biI0lsACgXDKrFa6xBBYAlE5mpWiNJbAAoBoHL61AjRXooQAA73GF6ShMsACgVkcbaAWKS4EFAEdwkNiK0lhRHgcAsCarh5sywQKAA6p4oBWiI0M8CABgWwJgXSZYAHBklY2yooSjwAIAWhXEVpTAivI4AIC9lV4FgR6/CRYA0FPuKCtKYwksAOCZ4kpLYAEAZSgrs0I0lsACAPLFj60QgRXiQQAAhVAOWTxNAMAkrrrzmiVCAOB9QZYOo5RflMcBAJRMUdwxwQIAFrTjKCtQ5AksAGA9m/VWoLpKAgsA2MSqpRWrrpLAAgB28n5yheuqG4EFAEQwqbfiplVLYAEAYQ2rK3paAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACX6PwiJZDZlA/mPAAAAAElFTkSuQmCC\n", + "text/plain": [ + "" + ] + }, + "execution_count": 104, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_landmark" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "id": "17302639", + "metadata": {}, + "outputs": [], + "source": [ + "img_seg.cutoff =0.9" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d5fd2718", + "metadata": {}, + "outputs": [], "source": [] } ], diff --git a/Scripts/Traits_class.py b/Scripts/Traits_class.py index cf8712c..9c07142 100644 --- a/Scripts/Traits_class.py +++ b/Scripts/Traits_class.py @@ -23,15 +23,20 @@ def __init__(self, file_name): 'pectoral_fin': [254, 0, 254],'head': [254, 254, 254],'eye': [0, 254, 102], 'caudal_fin_ray': [254, 102, 102],'alt_fin_ray': [254, 102, 204], 'trunk': [0, 124, 124]} + self.cutoff = 0.95 self.img_arr = self.import_image(file_name) self.get_channels_mask() - self.fish_angle = self.get_fish_angle() self.presence_matrix = self.get_presence_matrix() - self.landmark = self.all_landmark() - self.measurement_with_bbox = self.measure_using_bbox() - self.measurement_with_lm = self.measure_using_lm() - + self.fish_angle = self.get_fish_angle() + def get_all_measures_landmarks(self): + ''' + Execute the multiple functions that calculate landmarks and measurements + ''' + self.landmark = self.all_landmark() + self.measurement_with_bbox = self.all_measure_using_bbox() + self.measurement_with_lm = self.all_measure_using_lm() + def import_image(self,file_name): ''' Import the image from "image_path" and convert to np.array astype uint8 (0-255) @@ -96,17 +101,6 @@ def align_fish(self): return image_align - def visualize_trait(self, trait): - - mask = self.mask - trait_color_dict = self. trait_color_dict - - if trait in list(trait_color_dict.keys()): - return Image.fromarray(mask[trait]*255) - - else: - print(f'trait {trait} is not reference') - def remove_holes(self, image): seed = np.copy(image) @@ -122,7 +116,7 @@ def clean_trait_region(self, trait_mask, percent_cut = 0.95): Find the biggest region return region_trait ''' - + percent_cutoff = self.cutoff # remove hole/fill empty area trait_filled = self.remove_holes(trait_mask) @@ -136,7 +130,7 @@ def clean_trait_region(self, trait_mask, percent_cut = 0.95): # Get the biggest instance(blob) of the trait biggest_region = sorted(trait_region, key=lambda r: r.area, reverse=True)[0] percent = biggest_region.area/total_area - if percent >=percent_cut: + if percent >=percent_cutoff: trait_region = biggest_region else: trait_region =[] @@ -310,10 +304,19 @@ def all_landmark(self): Calculate of the landmark front, back, top, bottom, center, new_mask = self.landmark_generic(trait_name) ''' - landmark={} + cutoff = self.cutoff + presence_matrix = self.presence_matrix + + # initialize a dictionnary with keys and empty lists as value + landmark={str(k):[] for k in range(1,19)} + #eye - landmark['14'], landmark['15'], landmark['16'], landmark['17'], center_eye, _ = self.landmark_generic('eye') - landmark['18'] = (round(center_eye[0]), round(center_eye[1])) + if presence_matrix['eye']['percentage']>=cutoff: + + landmark['14'], landmark['15'], landmark['16'], landmark['17'], center_eye, _ = self.landmark_generic('eye') + landmark['18'] = (round(center_eye[0]), round(center_eye[1])) + + # head landmark['1'], landmark['12'], landmark['2'] , landmark['13'], _, new_mask_head = self.landmark_generic('head') @@ -329,8 +332,7 @@ def all_landmark(self): landmark['10'],_ , _,_, _, _ = self.landmark_generic('pelvic_fin') landmark['9'], _, landmark['8'] , _, _, _ = self.landmark_generic('anal_fin') - - # reorder the key + # reorder the keys of the dictionnary new_landmark={} list_order = [str(i) for i in range(1,19)] for key in list_order: @@ -352,7 +354,7 @@ def measure_eye_area(self): if eye_region: return eye_region.area else: - return 'None' + return 0 def measure_head_area(self): ''' @@ -365,7 +367,7 @@ def measure_head_area(self): if head_region: return head_region.area else: - return 'None' + return 0 def measure_eye_head_ratio(self): ''' @@ -374,12 +376,13 @@ def measure_eye_head_ratio(self): 2- Area eye after cleaning and filing hole 3- ratio ''' - eye_areaa = measure_eye_area() + eye_area = measure_eye_area() head_area = measure_head_area() - eye_head_ratio = eye_area/head_area + if eye_area>0 and head_area>0: + eye_head_ratio = eye_area/head_area - return eye_head_ratio + return round(eye_head_ratio,2) def measure_eye_diameter(self): ''' @@ -387,22 +390,25 @@ def measure_eye_diameter(self): (area/pi)^1/2 ''' mask = self.mask + eq_diameter = 0 eye_region = self.clean_trait_region(mask['eye']) + if eye_region: + eq_diameter = eye_region.equivalent_diameter_area - eq_diameter = eye_region.equivalent_diameter_area - - return eq_diameter + return round(eq_diameter,2) def measure_head_length(self): ''' Measure vertical length of the head passing by the center of the eye ''' + landmark = self.landmark p_2 = landmark['2'] p_15 = landmark['15'] + # IF p_2 or p_15 get_distance will return 0 head_length = self.get_distance(p_2,p_15) - return head_length + return round(head_length,2) def calculate_triangle_area(self, point_1, point_2, point_3): @@ -415,7 +421,7 @@ def calculate_triangle_area(self, point_1, point_2, point_3): # calculate the area area = (s*(s-a)*(s-b)*(s-c)) ** 0.5 - return area + return round(area,2) def measure_head_length(self): ''' @@ -427,38 +433,46 @@ def measure_head_length(self): # head _, _, _, _, _, new_mask_head = self.landmark_generic('head') # head length, vertical line of the head passing by the center of the eye - row_eye = round(center_eye[0]) - head_hori_line = new_mask_head[row_eye,:] - index_hori = np.where(head_hori_line == 1)[0] + if center_eye and np.any(new_mask_head): + row_eye = round(center_eye[0]) + + head_hori_line = new_mask_head[row_eye,:] + index_hori = np.where(head_hori_line == 1)[0] - # Get start and end of the horizontal line to check - start_h = (row_eye,np.max(index_hori)) - end_h = (row_eye,np.min(index_hori)) + # Get start and end of the horizontal line to check + start_h = (row_eye,np.max(index_hori)) + end_h = (row_eye,np.min(index_hori)) - head_length = np.count_nonzero( head_hori_line) + head_length = np.count_nonzero( head_hori_line) return head_length, start_h, end_h def measure_head_depth(self): ''' - Measure horizontal length of the head passing by the center of the eye + Measure horizontal length of the head passing through the center of the eye ''' + head_depth = 'None' + start_v = 'None' + end_v = 'None' + #eye _, _, _, _, center_eye, _ = self.landmark_generic('eye') # head _, _, _, _, _, new_mask_head = self.landmark_generic('head') - # head depth, horizontal line of the head passing by the center of the eye - col_eye = round(center_eye[1]) + if center_eye and np.any(new_mask_head): + + # head depth, horizontal line of the head passing by the center of the eye + col_eye = round(center_eye[1]) - head_vert_line = new_mask_head[:,col_eye] + head_vert_line = new_mask_head[:,col_eye] - index_verti = np.where(head_vert_line == 1)[0] - start_v = (np.max(index_verti),col_eye) - end_v = (np.min(index_verti),col_eye) + index_verti = np.where(head_vert_line == 1)[0] + start_v = (np.max(index_verti),col_eye) + end_v = (np.min(index_verti),col_eye) - head_depth = np.count_nonzero(head_vert_line) + head_depth = np.count_nonzero(head_vert_line) return head_depth, start_v, end_v @@ -479,7 +493,7 @@ def measure_body_length(self): return body_length - def measure_using_lm(self): + def all_measure_using_lm(self): ''' Collect all the measurment for the fish that using mainly landmarks ''' @@ -487,19 +501,19 @@ def measure_using_lm(self): measure={'SL_lm':'None', 'EA':'None', 'HA':'None', 'ED':'None', 'HL_lm':'None', 'pOD_lm':'None' } # Standard Length (body length) if landmark['1'] and landmark['6']: - measure['SL_lm'] = self.get_distance(landmark['1'],landmark['6']) + measure['SL_lm'] = round(self.get_distance(landmark['1'],landmark['6']),2) # Eye Area - measure['EA'] = int(self.measure_eye_area()) + measure['EA'] = self.measure_eye_area() # Head area measure['HA'] = self.measure_head_area() # Eye Diameter - measure['ED'] = self.measure_eye_diameter() + measure['ED'] = round(self.measure_eye_diameter(),2) # Head Length if landmark['1'] and landmark['12']: - measure['HL_lm'] = self.get_distance(landmark['1'],landmark['12']) + measure['HL_lm'] = round(self.get_distance(landmark['1'],landmark['12']),2) # preObital Depth if landmark['1']and landmark['14']: - measure['pOD_lm'] = self.get_distance(landmark['1'],landmark['14']) + measure['pOD_lm'] = round(self.get_distance(landmark['1'],landmark['14']),2) return measure @@ -513,10 +527,10 @@ def measure_SL_bbox(self): Combine head and trunk and measure bbox length ''' standard_length = "None" - head_eye_trunk = self.combine_trait_mask(['head','eye','trunk']) - if np.any(head_eye_trunk): + head_trunk = self.combine_trait_mask(['head','trunk']) + if np.any(head_trunk): - trait_region= self.clean_trait_region(head_eye_trunk) + trait_region= self.clean_trait_region(head_trunk) min_row, min_col, max_row, max_col = trait_region.bbox # (up, left, bottom, right) <=> (min_row, min_col, max_row, max_col) standard_length = max_col-min_col @@ -557,20 +571,7 @@ def measure_pOD_bbox(self): return pOD_bbox - def measure_body_depth(self): - ''' - Measure height of bounding box of the trunk - ''' - body_depth = "None" - presence_matrix = self.presence_matrix - if presence_matrix['trunk']['number']>=1: - trunk_region = self.clean_trait_region(self.mask['trunk']) - xb0, yb0, xb1, yb1 = trunk_region.bbox - body_depth = xb1-xb0 - - return body_depth - - def measure_using_bbox(self): + def all_measure_using_bbox(self): ''' Collect the measurment for the fish for Meghan paper ''' @@ -598,7 +599,16 @@ def measure_using_bbox(self): ############################ # Visualization function ############################ - + def visualize_trait(self, trait): + + mask = self.mask + trait_color_dict = self. trait_color_dict + + if trait in list(trait_color_dict.keys()): + return Image.fromarray(mask[trait]*255) + + else: + print(f'trait {trait} is not reference') def visualize_landmark(self): landmark = self.all_landmark() @@ -611,6 +621,7 @@ def visualize_landmark(self): fnt = ImageFont.load_default() for i,(k,v) in enumerate(landmark.items()): + # landmark exist draw it on the image if v: row,col = v xy = [(col-9,row-9),(col+9,row+9)] From 02201cbd22c62a048f6c341e53d8479df3a8d8b4 Mon Sep 17 00:00:00 2001 From: Thibault Tabarin Date: Sat, 23 Jul 2022 16:51:19 -0400 Subject: [PATCH 3/4] add fish angles --- .../Morphology_dev-checkpoint.ipynb | 73 +++++----- Scripts/Morphology_dev.ipynb | 73 +++++----- Scripts/Morphology_main.py | 47 ++++++- Scripts/Traits_class.py | 133 ++++++++++++------ Test_Data/INHS_FISH_18609_image_lm.png | Bin 5499 -> 5548 bytes Test_Data/INHS_FISH_18609_landmark.json | 2 +- Test_Data/INHS_FISH_18609_measure.json | 2 +- 7 files changed, 214 insertions(+), 116 deletions(-) diff --git a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb index 5e4ec31..8d90b52 100644 --- a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb +++ b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 12, "id": "602dc370", "metadata": {}, "outputs": [ @@ -31,7 +31,7 @@ "" ] }, - "execution_count": 80, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -39,7 +39,7 @@ "source": [ "# load what you need\n", "import Traits_class as tc\n", - "import json, sys\n", + "import json, sys, os\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from skimage.measure import label, regionprops\n", @@ -52,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 13, "id": "e620246b", "metadata": {}, "outputs": [], @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 14, "id": "8a2dae3d", "metadata": {}, "outputs": [], @@ -76,15 +76,17 @@ }, { "cell_type": "code", - "execution_count": 83, + "execution_count": 21, "id": "2289de98", "metadata": {}, "outputs": [], "source": [ "# output the variables create at initialization time\n", "img_seg.get_all_measures_landmarks()\n", - "measure_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", - "measure_lm = img_seg.measurement_with_lm # measurement using bbox\n", + "base_name = img_seg.base_name\n", + "measurements_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", + "measurements_lm = img_seg.measurement_with_lm # measurement using bbox\n", + "measurements_area =img_seg.all_measure_area()\n", "landmark = img_seg.landmark\n", "presence_matrix = img_seg.presence_matrix\n", "img_landmark = img_seg.visualize_landmark()" @@ -105,7 +107,7 @@ }, { "cell_type": "code", - "execution_count": 85, + "execution_count": 19, "id": "ae9eb407", "metadata": {}, "outputs": [ @@ -125,7 +127,7 @@ " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" ] }, - "execution_count": 85, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -137,7 +139,7 @@ }, { "cell_type": "code", - "execution_count": 86, + "execution_count": 22, "id": "b24d03d1", "metadata": {}, "outputs": [ @@ -147,24 +149,23 @@ "{'SL_bbox': 587,\n", " 'HL_bbox': 152,\n", " 'ED_bbox': 31,\n", - " 'HD_eye': 100,\n", " 'pOD_bbox': 30,\n", - " 'fish_angle': 2.0124973591623814}" + " 'fish_angle': 2.01}" ] }, - "execution_count": 86, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# measurement dictionnary with measurement using bbox\n", - "measure_bbox" + "measurements_bbox" ] }, { "cell_type": "code", - "execution_count": 87, + "execution_count": 23, "id": "e5d892d3", "metadata": {}, "outputs": [ @@ -172,53 +173,57 @@ "data": { "text/plain": [ "{'SL_lm': 586.0,\n", - " 'EA': 922,\n", - " 'HA': 16034,\n", - " 'ED': 34.26,\n", " 'HL_lm': 151.65,\n", - " 'pOD_lm': 32.31}" + " 'ED_lm': 30.07,\n", + " 'HH_lm': 100,\n", + " 'HH_lm_v2': 99.0,\n", + " 'pOD_lm': 32.31,\n", + " 'HD_lm': 158.32}" ] }, - "execution_count": 87, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# measurement dictionnary with measurement using landmarks\n", - "measure_lm" + "measurements_lm" ] }, { "cell_type": "code", - "execution_count": 88, - "id": "fe50c813", + "execution_count": 26, + "id": "201ecfe1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'SL_bbox': 587,\n", + "{'base_name': 'INHS_FISH_000742',\n", + " 'SL_bbox': 587,\n", + " 'SL_lm': 586.0,\n", " 'HL_bbox': 152,\n", - " 'ED_bbox': 31,\n", - " 'HD_eye': 100,\n", + " 'HL_lm': 151.65,\n", " 'pOD_bbox': 30,\n", - " 'fish_angle': 2.0124973591623814,\n", - " 'SL_lm': 586.0,\n", + " 'pOD_lm': 32.31,\n", + " 'ED_bbox': 31,\n", + " 'ED_lm': 30.07,\n", + " 'HH_lm': 100,\n", " 'EA': 922,\n", " 'HA': 16034,\n", - " 'ED': 34.26,\n", - " 'HL_lm': 151.65,\n", - " 'pOD_lm': 32.31}" + " 'fish_angle': 2.01}" ] }, - "execution_count": 88, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "measurement = {**measure_bbox, **measure_lm}\n", + "measurement = {'base_name': base_name, **measurements_bbox, **measurements_lm, **measurements_area }\n", + "list_measure= ['base_name','SL_bbox', 'SL_lm', 'HL_bbox', 'HL_lm', 'pOD_bbox', 'pOD_lm', 'ED_bbox', 'ED_lm', 'HH_lm', 'EA','HA','fish_angle']\n", + "measurement = {k:measurement[k] for k in list_measure}\n", "measurement" ] }, diff --git a/Scripts/Morphology_dev.ipynb b/Scripts/Morphology_dev.ipynb index 5e4ec31..8d90b52 100644 --- a/Scripts/Morphology_dev.ipynb +++ b/Scripts/Morphology_dev.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 12, "id": "602dc370", "metadata": {}, "outputs": [ @@ -31,7 +31,7 @@ "" ] }, - "execution_count": 80, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -39,7 +39,7 @@ "source": [ "# load what you need\n", "import Traits_class as tc\n", - "import json, sys\n", + "import json, sys, os\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from skimage.measure import label, regionprops\n", @@ -52,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 13, "id": "e620246b", "metadata": {}, "outputs": [], @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 14, "id": "8a2dae3d", "metadata": {}, "outputs": [], @@ -76,15 +76,17 @@ }, { "cell_type": "code", - "execution_count": 83, + "execution_count": 21, "id": "2289de98", "metadata": {}, "outputs": [], "source": [ "# output the variables create at initialization time\n", "img_seg.get_all_measures_landmarks()\n", - "measure_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", - "measure_lm = img_seg.measurement_with_lm # measurement using bbox\n", + "base_name = img_seg.base_name\n", + "measurements_bbox = img_seg.measurement_with_bbox # measurement using bbox\n", + "measurements_lm = img_seg.measurement_with_lm # measurement using bbox\n", + "measurements_area =img_seg.all_measure_area()\n", "landmark = img_seg.landmark\n", "presence_matrix = img_seg.presence_matrix\n", "img_landmark = img_seg.visualize_landmark()" @@ -105,7 +107,7 @@ }, { "cell_type": "code", - "execution_count": 85, + "execution_count": 19, "id": "ae9eb407", "metadata": {}, "outputs": [ @@ -125,7 +127,7 @@ " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" ] }, - "execution_count": 85, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -137,7 +139,7 @@ }, { "cell_type": "code", - "execution_count": 86, + "execution_count": 22, "id": "b24d03d1", "metadata": {}, "outputs": [ @@ -147,24 +149,23 @@ "{'SL_bbox': 587,\n", " 'HL_bbox': 152,\n", " 'ED_bbox': 31,\n", - " 'HD_eye': 100,\n", " 'pOD_bbox': 30,\n", - " 'fish_angle': 2.0124973591623814}" + " 'fish_angle': 2.01}" ] }, - "execution_count": 86, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# measurement dictionnary with measurement using bbox\n", - "measure_bbox" + "measurements_bbox" ] }, { "cell_type": "code", - "execution_count": 87, + "execution_count": 23, "id": "e5d892d3", "metadata": {}, "outputs": [ @@ -172,53 +173,57 @@ "data": { "text/plain": [ "{'SL_lm': 586.0,\n", - " 'EA': 922,\n", - " 'HA': 16034,\n", - " 'ED': 34.26,\n", " 'HL_lm': 151.65,\n", - " 'pOD_lm': 32.31}" + " 'ED_lm': 30.07,\n", + " 'HH_lm': 100,\n", + " 'HH_lm_v2': 99.0,\n", + " 'pOD_lm': 32.31,\n", + " 'HD_lm': 158.32}" ] }, - "execution_count": 87, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# measurement dictionnary with measurement using landmarks\n", - "measure_lm" + "measurements_lm" ] }, { "cell_type": "code", - "execution_count": 88, - "id": "fe50c813", + "execution_count": 26, + "id": "201ecfe1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'SL_bbox': 587,\n", + "{'base_name': 'INHS_FISH_000742',\n", + " 'SL_bbox': 587,\n", + " 'SL_lm': 586.0,\n", " 'HL_bbox': 152,\n", - " 'ED_bbox': 31,\n", - " 'HD_eye': 100,\n", + " 'HL_lm': 151.65,\n", " 'pOD_bbox': 30,\n", - " 'fish_angle': 2.0124973591623814,\n", - " 'SL_lm': 586.0,\n", + " 'pOD_lm': 32.31,\n", + " 'ED_bbox': 31,\n", + " 'ED_lm': 30.07,\n", + " 'HH_lm': 100,\n", " 'EA': 922,\n", " 'HA': 16034,\n", - " 'ED': 34.26,\n", - " 'HL_lm': 151.65,\n", - " 'pOD_lm': 32.31}" + " 'fish_angle': 2.01}" ] }, - "execution_count": 88, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "measurement = {**measure_bbox, **measure_lm}\n", + "measurement = {'base_name': base_name, **measurements_bbox, **measurements_lm, **measurements_area }\n", + "list_measure= ['base_name','SL_bbox', 'SL_lm', 'HL_bbox', 'HL_lm', 'pOD_bbox', 'pOD_lm', 'ED_bbox', 'ED_lm', 'HH_lm', 'EA','HA','fish_angle']\n", + "measurement = {k:measurement[k] for k in list_measure}\n", "measurement" ] }, diff --git a/Scripts/Morphology_main.py b/Scripts/Morphology_main.py index c1ac49c..06dfd68 100755 --- a/Scripts/Morphology_main.py +++ b/Scripts/Morphology_main.py @@ -6,7 +6,7 @@ @author: thibault """ import Traits_class as tc -import json, sys +import json, sys, math import numpy as np def get_scale(metadata_file): @@ -28,6 +28,28 @@ def get_scale(metadata_file): unit =[None] return scale , unit + +def get_angle(metadata_file): + + ''' + Calculate fish orientation from metadata file using major axis + return value in degree + + ''' + f = open(metadata_file) + data = json.load(f) + metadata_fish = list(data.values())[0]['fish'][0] + + major = [] + length = [] + + if 'primary_axis' in metadata_fish : + + major = metadata_fish['primary_axis'] + fish_angle = math.atan2(major[1], -major[0])*(180/math.pi) + + return round(fish_angle,2) + # this class is used by json.dump to control that every value as the right format # particular problem encounter with np.int64 value type class NpEncoder(json.JSONEncoder): @@ -44,20 +66,35 @@ def default(self, obj): def main(input_file, metadata_file, output_measure, output_landmark, output_presence, output_lm_image=None): + # Create the image segmentation object img_seg = tc.segmented_image(input_file) - measurement_bbox = img_seg.measurement_with_bbox - measurement_lm = img_seg.measurement_with_lm - # combine the 2 types of measurement - measurement = {**measurement_bbox, **measurement_lm} + base_name = img_seg.base_name + # Calcualte the mesaurements and landmarks + img_seg.get_all_measures_landmarks() + + # Assign variables + measurements_bbox = img_seg.measurement_with_bbox + measurements_lm = img_seg.measurement_with_lm + measurements_area = img_seg.measurement_with_area landmark = img_seg.landmark presence_matrix = img_seg.presence_matrix + # Combine the 3 types of measurements (lm, bbox, area) and reorder the keys + measurement = {'base_name': base_name, **measurements_bbox, **measurements_lm, **measurements_area } + list_measure= ['base_name', 'SL_bbox', 'SL_lm', 'HL_bbox', 'HL_lm', 'pOD_bbox', 'pOD_lm', 'ED_bbox', 'ED_lm', 'HH_lm', 'EA_m','HA_m','FA_pca','FA_lm'] + measurement = {k:measurement[k] for k in list_measure} + # Extract the scale from metadata file # and add it to measurement dict scale , unit = get_scale(metadata_file) measurement['scale'] = scale measurement['unit'] = unit + # Extract the fish angle from metadata file + # and add it to measurement dict + fish_angle = get_angle(metadata_file) + measurement['FA_pca_meta'] = fish_angle + # Save the dictionnaries in json file # use NpEncoder to convert the value to correct type (np.int64 -> int) with open(output_measure, 'w') as f: diff --git a/Scripts/Traits_class.py b/Scripts/Traits_class.py index 9c07142..72842fd 100644 --- a/Scripts/Traits_class.py +++ b/Scripts/Traits_class.py @@ -8,26 +8,29 @@ Version 1 """ import os, sys, math, json +from operator import sub import numpy as np from PIL import Image, ImageDraw, ImageFont from skimage.measure import label, regionprops from skimage.morphology import reconstruction + class segmented_image: def __init__(self, file_name): self.file = file_name - self.image_name = os.path.split(file_name)[1] # creates a new empty list for each dog + self.image_name = os.path.split(file_name)[1] + self.base_name = self.image_name.rsplit('_',1)[0] self.trait_color_dict={'background': [0, 0, 0],'dorsal_fin': [254, 0, 0],'adipos_fin': [0, 254, 0], 'caudal_fin': [0, 0, 254],'anal_fin': [254, 254, 0],'pelvic_fin': [0, 254, 254], 'pectoral_fin': [254, 0, 254],'head': [254, 254, 254],'eye': [0, 254, 102], 'caudal_fin_ray': [254, 102, 102],'alt_fin_ray': [254, 102, 204], 'trunk': [0, 124, 124]} - self.cutoff = 0.95 + self.cutoff = 0.60 self.img_arr = self.import_image(file_name) self.get_channels_mask() self.presence_matrix = self.get_presence_matrix() - self.fish_angle = self.get_fish_angle() + self.fish_angle = self.get_fish_angle_pca() def get_all_measures_landmarks(self): ''' @@ -36,6 +39,8 @@ def get_all_measures_landmarks(self): self.landmark = self.all_landmark() self.measurement_with_bbox = self.all_measure_using_bbox() self.measurement_with_lm = self.all_measure_using_lm() + self.measurement_with_area = self.all_measure_area() + def import_image(self,file_name): ''' @@ -70,22 +75,26 @@ def get_channels_mask(self): self.mask = mask - def get_fish_angle(self): + def get_fish_angle_pca(self): ''' - Calculate orientation (PCA) of the mask of head + eye + trunk - We choose to combine only head eye and trunk because they are the most reliable feature, fins can bias the measurement of the - orientation. + Calculate orientation (PCA) of the mask of whole fish + We choose to combine whole fish part and calculate orientation. return value in degree ''' - angle_deg = "None" - head_eye_trunk = self.combine_trait_mask(['head','eye','trunk']) - if np.any(head_eye_trunk): + fish_angle = "None" + mask = self.mask + whole_fish = np.zeros_like(None,dtype="uint8") + for i,(k,v) in enumerate(mask.items()): + whole_fish = whole_fish +v + + # Check that the mask is not empty + if np.any(whole_fish): - trait_region = self.clean_trait_region(head_eye_trunk) + trait_region = self.clean_trait_region(whole_fish) angle_rad = trait_region.orientation - angle_deg = (90-angle_rad*180/math.pi) + fish_angle = (90-angle_rad*180/math.pi) - return angle_deg + return round(fish_angle,2) def align_fish(self): ''' @@ -110,7 +119,7 @@ def remove_holes(self, image): return filled - def clean_trait_region(self, trait_mask, percent_cut = 0.95): + def clean_trait_region(self, trait_mask): ''' Clean the mask_trait (remove holes) Find the biggest region @@ -450,7 +459,7 @@ def measure_head_length(self): def measure_head_depth(self): ''' - Measure horizontal length of the head passing through the center of the eye + Measure vertical length of the head passing through the center of the eye ''' head_depth = 'None' start_v = 'None' @@ -468,6 +477,7 @@ def measure_head_depth(self): head_vert_line = new_mask_head[:,col_eye] + # Calculate the start and end of the vertical line, for sanity check index_verti = np.where(head_vert_line == 1)[0] start_v = (np.max(index_verti),col_eye) end_v = (np.min(index_verti),col_eye) @@ -493,30 +503,72 @@ def measure_body_length(self): return body_length + def measure_fish_angle_lm(self): + ''' + measure fish angle using orientation of the line define by landmark#1 and landmark #6 + ''' + landmark = self.landmark + fish_angle_lm = None + if landmark['1'] and landmark['6']: + + # translation to origin + trans_to_origin = list(map(sub, landmark['6'], landmark['1'])) + fish_angle_lm = math.atan2(trans_to_origin[0], trans_to_origin[1])*(180/math.pi) + + return round(fish_angle_lm,2) + def all_measure_using_lm(self): ''' - Collect all the measurment for the fish that using mainly landmarks + Collect all the measurment for the fish that are only using landmarks ''' landmark = self.landmark - measure={'SL_lm':'None', 'EA':'None', 'HA':'None', 'ED':'None', 'HL_lm':'None', 'pOD_lm':'None' } - # Standard Length (body length) + measures_lm={'SL_lm':'None', 'HL_lm':'None','ED_lm':'None', 'HH_lm':'None', 'HH_lm_v2':'None', 'pOD_lm':'None' } + # Standard Length (body length), landmark if landmark['1'] and landmark['6']: - measure['SL_lm'] = round(self.get_distance(landmark['1'],landmark['6']),2) - # Eye Area - measure['EA'] = self.measure_eye_area() - # Head area - measure['HA'] = self.measure_head_area() - # Eye Diameter - measure['ED'] = round(self.measure_eye_diameter(),2) - # Head Length + measures_lm['SL_lm'] = round(self.get_distance(landmark['1'],landmark['6']),2) + + # Head Length, landmark if landmark['1'] and landmark['12']: - measure['HL_lm'] = round(self.get_distance(landmark['1'],landmark['12']),2) - # preObital Depth - if landmark['1']and landmark['14']: - measure['pOD_lm'] = round(self.get_distance(landmark['1'],landmark['14']),2) + measures_lm['HL_lm'] = round(self.get_distance(landmark['1'],landmark['12']),2) - return measure - + #Eye Diamter, landmark + if landmark['14'] and landmark['15']: + measures_lm['ED_lm'] = round(self.get_distance(landmark['14'],landmark['15']),2) + + if landmark['18']: + # Head Height, height of the line going through the middle of the eye landmark #18 + measures_lm['HH_lm'], start, end = self.measure_head_depth() + # Sanity check for the measure of HH_lm using start and end of the vertical line through the eye + measures_lm['HH_lm_v2'] = round(self.get_distance(start,end),2) + + # preObital Depth, landamrk + if landmark['1'] and landmark['14']: + measures_lm['pOD_lm'] = round(self.get_distance(landmark['1'],landmark['14']),2) + + # Head Depth, landmark + if landmark['2'] and landmark['13']: + measures_lm['HD_lm'] = round(self.get_distance(landmark['2'],landmark['13']),2) + + measures_lm['FA_lm'] = self.measure_fish_angle_lm() + + return measures_lm + + def all_measure_area(self): + ''' + Collect measuerements calculate using the area (measure from the skimage.measure.regionprops) + ''' + measure_area = {'EA_m':'None', 'HA_m':'None'} + # Eye Area + measure_area['EA_m'] = self.measure_eye_area() + # Head area + measure_area['HA_m'] = self.measure_head_area() + + return measure_area + + + + + ######################## # Measurement using bbox ######################## @@ -575,26 +627,24 @@ def all_measure_using_bbox(self): ''' Collect the measurment for the fish for Meghan paper ''' - measure={'SL_bbox':'None', 'HL_bbox':'None', 'ED_bbox':'None', 'HD_eye':'None','pOD_bbox':'None' } + measures_bbox={'SL_bbox':'None', 'HL_bbox':'None', 'ED_bbox':'None','pOD_bbox':'None', 'fish_angle':'None' } # SL standart length, length bbox of head+trunk - measure['SL_bbox'] = self.measure_SL_bbox() + measures_bbox['SL_bbox'] = self.measure_SL_bbox() # HL Head Length, length of bbox of the head - measure['HL_bbox'] = self.measure_length_bbox('head') + measures_bbox['HL_bbox'] = self.measure_length_bbox('head') # ED Eye Diameter - measure['ED_bbox'] = self.measure_length_bbox('eye') - # Head Depth, height of the line going through the middle of the eye - measure['HD_eye'], start, end = self.measure_head_depth() + measures_bbox['ED_bbox'] = self.measure_length_bbox('eye') # preorbital Depth - measure['pOD_bbox'] = self.measure_pOD_bbox() + measures_bbox['pOD_bbox'] = self.measure_pOD_bbox() # fish angle in case of connection - measure['fish_angle'] = self.fish_angle + measures_bbox['FA_pca'] = self.fish_angle - return measure + return measures_bbox ############################ # Visualization function @@ -609,6 +659,7 @@ def visualize_trait(self, trait): else: print(f'trait {trait} is not reference') + def visualize_landmark(self): landmark = self.all_landmark() diff --git a/Test_Data/INHS_FISH_18609_image_lm.png b/Test_Data/INHS_FISH_18609_image_lm.png index 25e9d44e50a623acfa82d00de04ae0304624ee15..ec52f71a2942599214ae19f132f14bb3717e9a19 100644 GIT binary patch delta 5477 zcmV-r6`Jb%Dy%DzBs+6SL_t(|obBChZrjM3fYBNvtC$52?jj6>5VVM1;ax>Tm>+a# zilV6EcYU0Lpy5trM`kGL@yik!0+C@Ne~_sEx%v(O9O7~C*KZE~`asqM7Eq3(qiRHB z0q+PbAY&&N)g+k(yb@SIHd4r`Ng4|n5m-Qql5MGZN(<=xx%v(Oa zM^^!?Ah3W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eGj(0)Ua15_hB;kN0HZ{?NXUSJQPcST#%0MP?6c*<eXl$$U!EW?HhX8N)y*DTAQ9V-dX z|M+M3$KBG(j3Ec_?I^Cs?+0Lce_Hc_oJ&rwXTwJym{G#Rh9kz*_a~20-`#zD9b<^v z4tG!gozo7#dnk%?#!l;fg!|(*ykMsntlEgs4myq4yzVi@nM ztZ?p{)?n1bk={xHe%pJZ?cW4`wiSuDC8?E5{puLPBN~)XE9Knwb=N5LB{Z#VrFMmA z{X0@Md}LJ8$BnD$jc;9 znzLV3N>hbTyBed$e)n(&CGum`2vq0cJb^Om&mFmIC|UcE@bLD zb@?<73|)7y&MFpK*OZ;`2cy%nL@z63QvSiXY6(}#=m>|`GPzHwYJBbPKaRUaJEPMQ zIU}bWxNg2v4uCX!WcWa+UOaSAOG+p;E2BZ&+e+#;k$fThc;D;XxO=5;>bm7NSBxn) z=v~b{_!jPR-mken_GR@6R*>(sL&U{K{3Spi_yvt8)GlHi{hA z?&=@^M)Y%uByyCHRcg1z?kbEZM})IA3UlvyY;|KseB>T-!o|5?4izmDZuL*LUjqpn znO%w9>En$|6wUX(_OOf<@bTGyR+m~IUF~?xG_M;T-VNG$y1J#R|C;Q-PeP}rO4VHL zE$0x4)_u7;bh;5h>;1x=#FVz;qi}ZK(stTHx@W**56W`GRQ%$qL4}*jI16v-)DtI@ zhkQ2fcc^y~#h20+|G(8Xsw4M&+)J<(W(klOrLjMmSta8HABOhvO T-KVYnPt7A8BW;o Date: Mon, 25 Jul 2022 12:52:54 -0400 Subject: [PATCH 4/4] clean Test_data, minor fix in Morphology_main.py --- .../Morphology_dev-checkpoint.ipynb | 165 ++++++++++- Scripts/Morphology_dev.ipynb | 266 ++++++++++++++++-- Test_Data/INHS_FISH_18609.json | 1 - Test_Data/INHS_FISH_18609_image_lm.png | Bin 5548 -> 0 bytes Test_Data/INHS_FISH_18609_landmark.json | 1 - Test_Data/INHS_FISH_18609_measure.json | 1 - Test_Data/INHS_FISH_18609_presence.json | 1 - Test_Data/INHS_FISH_18609_segmented.png | Bin 4083 -> 0 bytes 8 files changed, 406 insertions(+), 29 deletions(-) delete mode 100755 Test_Data/INHS_FISH_18609.json delete mode 100644 Test_Data/INHS_FISH_18609_image_lm.png delete mode 100644 Test_Data/INHS_FISH_18609_landmark.json delete mode 100644 Test_Data/INHS_FISH_18609_measure.json delete mode 100644 Test_Data/INHS_FISH_18609_presence.json delete mode 100755 Test_Data/INHS_FISH_18609_segmented.png diff --git a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb index 8d90b52..06509ad 100644 --- a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb +++ b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 1, "id": "602dc370", "metadata": {}, "outputs": [ @@ -31,7 +31,7 @@ "" ] }, - "execution_count": 12, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -2226,10 +2226,169 @@ "img_seg.cutoff =0.9" ] }, + { + "cell_type": "markdown", + "id": "7fdad3ce", + "metadata": {}, + "source": [ + "## Develop fish angle section" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "b1741d90", + "metadata": {}, + "outputs": [], + "source": [ + "def get_angles(metadata_file):\n", + "\n", + " '''\n", + " extract the scale value from metadata file\n", + " '''\n", + " \n", + " f = open(metadata_file)\n", + " data = json.load(f)\n", + " metadata_fish = list(data.values())[0]['fish'][0]\n", + " \n", + " major = []\n", + " length = []\n", + " \n", + " if 'primary_axis' in metadata_fish :\n", + " \n", + " major = metadata_fish['primary_axis']\n", + " length = metadata_fish['major_axis_length']\n", + " center = metadata_fish['centroid']\n", + " return major, length, center" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "cd747d4c", + "metadata": {}, + "outputs": [], + "source": [ + "metadata_file = '../Test_Data/INHS_FISH_000742.json'\n", + "mask_name = '../Test_Data/INHS_FISH_000742_mask.png'" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "8bb34a1a", + "metadata": {}, + "outputs": [], + "source": [ + "major, length, center = get_angles(metadata_file)" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "id": "b6151290", + "metadata": {}, + "outputs": [], + "source": [ + "# import mask from metadata\n", + "from PIL import Image, ImageDraw, ImageFont\n", + "img = Image.open(mask_name)\n", + "mask_arr = np.array(img, dtype=np.uint8)" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "id": "b59155b5", + "metadata": {}, + "outputs": [], + "source": [ + "major_axis= [center[1] + x_v1 * scale , center [1] - x_v1 * scale ], [center[0] - y_v1 * scale, center[0] + y_v1 * scale]" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "id": "8dedce3e", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD8CAYAAAB+UHOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAkvElEQVR4nO3de5wU9Znv8c/T3XMFBhhwYJgBAQUMqEFBLqubddUVYi5gsiaY3aiJCcZb9KzJRjfZk909yeayxpzV3XiCiVESlRATo/GSBFGiiQiigoCAjHIbZxzkPhfm0t3P+aOLtQPDTA8zTE9T3/fr1a+ufrqq6/fjUt+uX1VXmbsjIiLhE8l2A0REJDsUACIiIaUAEBEJKQWAiEhIKQBEREJKASAiElK9HgBmNtvMNplZlZnd2tvrFxGRFOvN3wGYWRR4A/gboBp4Cbjc3V/vtUaIiAjQ+3sA04Aqd3/L3VuBRcCcXm6DiIgAsV5eXwWwI+11NTD98JnMbD4wHyBKdEoxJb3TOhGRPq6ZRlq9xXris3o7ANpr9BFjUO6+AFgAUGKlPt0uPN7tEhHJCSt8aY99Vm8PAVUDI9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0ZtPchoBZoI5XEVwNDSB2M2xw8l6bN/9Wgb5tIO1IPTCX1j/pN4L847MBQFvp1HqndyNeA1cHjklzvG3Am8GrQr3XA/w7qOd2vw/p4Pu8dBM75fpEaK18TPNYf2i6cIH2bDKwK/j3+GhjcG/3SpSBEREKqrw4BiYjIcaYAEBEJKQWAiEhIKQBEREJKASAiElIKABGRkFIAiIiE1P8H+V8dIwvNZawAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "scale = 1500\n", + "x_v1, y_v1 = major\n", + "plt.imshow(mask_arr)\n", + "plt.plot( [center[0] + x_v1 * scale , center [0] - x_v1 * scale ], [center[1] - y_v1 * scale, center[1] + y_v1 * scale], color='red')\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "id": "52d74129", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.8987189916850526" + ] + }, + "execution_count": 104, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import math\n", + "math.atan(-major[1]/major[0])*(180/math.pi)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 107, + "id": "a1c8b4cf", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.8987189916850298" + ] + }, + "execution_count": 107, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# orientation using mask and region prop\n", + "import os, sys, math, json\n", + "import numpy as np\n", + "from PIL import Image, ImageDraw, ImageFont\n", + "from skimage.measure import label, regionprops\n", + "from skimage.morphology import reconstruction\n", + "\n", + "region = regionprops(mask_arr)[0]\n", + "fish_angle = 90-region.orientation*(180/math.pi)\n", + "bbox" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "d5fd2718", + "id": "321f28e8", "metadata": {}, "outputs": [], "source": [] diff --git a/Scripts/Morphology_dev.ipynb b/Scripts/Morphology_dev.ipynb index 8d90b52..d12a653 100644 --- a/Scripts/Morphology_dev.ipynb +++ b/Scripts/Morphology_dev.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 170, "id": "602dc370", "metadata": {}, "outputs": [ @@ -31,7 +31,7 @@ "" ] }, - "execution_count": 12, + "execution_count": 170, "metadata": {}, "output_type": "execute_result" } @@ -52,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 171, "id": "e620246b", "metadata": {}, "outputs": [], @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 172, "id": "8a2dae3d", "metadata": {}, "outputs": [], @@ -76,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 173, "id": "2289de98", "metadata": {}, "outputs": [], @@ -107,7 +107,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 174, "id": "ae9eb407", "metadata": {}, "outputs": [ @@ -127,7 +127,7 @@ " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" ] }, - "execution_count": 19, + "execution_count": 174, "metadata": {}, "output_type": "execute_result" } @@ -139,7 +139,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 175, "id": "b24d03d1", "metadata": {}, "outputs": [ @@ -150,10 +150,11 @@ " 'HL_bbox': 152,\n", " 'ED_bbox': 31,\n", " 'pOD_bbox': 30,\n", - " 'fish_angle': 2.01}" + " 'fish_angle': 'None',\n", + " 'FA_pca': 0.95}" ] }, - "execution_count": 22, + "execution_count": 175, "metadata": {}, "output_type": "execute_result" } @@ -165,7 +166,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 176, "id": "e5d892d3", "metadata": {}, "outputs": [ @@ -178,10 +179,11 @@ " 'HH_lm': 100,\n", " 'HH_lm_v2': 99.0,\n", " 'pOD_lm': 32.31,\n", - " 'HD_lm': 158.32}" + " 'HD_lm': 158.32,\n", + " 'FA_lm': 0.19554797627085738}" ] }, - "execution_count": 23, + "execution_count": 176, "metadata": {}, "output_type": "execute_result" } @@ -193,7 +195,29 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 177, + "id": "fe183e51", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'EA_m': 922, 'HA_m': 16034}" + ] + }, + "execution_count": 177, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# measurement dictionnary for area\n", + "measurements_area" + ] + }, + { + "cell_type": "code", + "execution_count": 178, "id": "201ecfe1", "metadata": {}, "outputs": [ @@ -210,23 +234,58 @@ " 'ED_bbox': 31,\n", " 'ED_lm': 30.07,\n", " 'HH_lm': 100,\n", - " 'EA': 922,\n", - " 'HA': 16034,\n", - " 'fish_angle': 2.01}" + " 'EA_m': 922,\n", + " 'HA_m': 16034,\n", + " 'FA_pca': 0.95,\n", + " 'FA_lm': 0.19554797627085738}" ] }, - "execution_count": 26, + "execution_count": 178, "metadata": {}, "output_type": "execute_result" } ], "source": [ "measurement = {'base_name': base_name, **measurements_bbox, **measurements_lm, **measurements_area }\n", - "list_measure= ['base_name','SL_bbox', 'SL_lm', 'HL_bbox', 'HL_lm', 'pOD_bbox', 'pOD_lm', 'ED_bbox', 'ED_lm', 'HH_lm', 'EA','HA','fish_angle']\n", + "list_measure= ['base_name','SL_bbox', 'SL_lm', 'HL_bbox', 'HL_lm', 'pOD_bbox', 'pOD_lm', 'ED_bbox', 'ED_lm', 'HH_lm', 'EA_m','HA_m','FA_pca', 'FA_lm']\n", "measurement = {k:measurement[k] for k in list_measure}\n", "measurement" ] }, + { + "cell_type": "code", + "execution_count": 137, + "id": "df258ada", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2, 586]\n", + "(162, 187) (148, 36)\n" + ] + }, + { + "data": { + "text/plain": [ + "0.19554797627085738" + ] + }, + "execution_count": 137, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from operator import sub\n", + "print(list(map(sub, landmark['6'], landmark['1'])))\n", + "print(landmark['12'], landmark['1'])\n", + "\n", + "scale_to_origin = list(map(sub, landmark['6'], landmark['1']))\n", + "math.atan2(scale_to_origin[0],scale_to_origin[1])*(180/math.pi)" + ] + }, { "cell_type": "code", "execution_count": 89, @@ -2226,13 +2285,176 @@ "img_seg.cutoff =0.9" ] }, + { + "cell_type": "markdown", + "id": "7fdad3ce", + "metadata": {}, + "source": [ + "## Develop fish angle section" + ] + }, { "cell_type": "code", - "execution_count": null, - "id": "d5fd2718", + "execution_count": 47, + "id": "b1741d90", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "def get_angles(metadata_file):\n", + "\n", + " '''\n", + " Calculate fish orientation from metadata file using major axis\n", + " return value in degree\n", + " \n", + " '''\n", + " f = open(metadata_file)\n", + " data = json.load(f)\n", + " metadata_fish = list(data.values())[0]['fish'][0]\n", + " \n", + " major = []\n", + " length = []\n", + " \n", + " if 'primary_axis' in metadata_fish :\n", + " \n", + " major = metadata_fish['primary_axis']\n", + " fish_angle = math.atan2(major[1], -major[0])*(180/math.pi)\n", + " \n", + " return fish_angle" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "cd747d4c", + "metadata": {}, + "outputs": [], + "source": [ + "metadata_file = '../Test_Data/INHS_FISH_000742.json'\n", + "mask_name = '../Test_Data/INHS_FISH_000742_mask.png'" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "8bb34a1a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.8987189916850526" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "get_angles(metadata_file)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "b6151290", + "metadata": {}, + "outputs": [], + "source": [ + "# import mask from metadata\n", + "from PIL import Image, ImageDraw, ImageFont\n", + "img = Image.open(mask_name)\n", + "mask_arr = np.array(img, dtype=np.uint8)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "b59155b5", + "metadata": {}, + "outputs": [], + "source": [ + "x_v1, y_v1 = major\n", + "scale = 1500\n", + "major_axis= [center[1] + x_v1 * scale , center [1] - x_v1 * scale ], [center[0] - y_v1 * scale, center[0] + y_v1 * scale]" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "8dedce3e", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD8CAYAAAB+UHOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAkvElEQVR4nO3de5wU9Znv8c/T3XMFBhhwYJgBAQUMqEFBLqubddUVYi5gsiaY3aiJCcZb9KzJRjfZk909yeayxpzV3XiCiVESlRATo/GSBFGiiQiigoCAjHIbZxzkPhfm0t3P+aOLtQPDTA8zTE9T3/fr1a+ufrqq6/fjUt+uX1VXmbsjIiLhE8l2A0REJDsUACIiIaUAEBEJKQWAiEhIKQBEREJKASAiElK9HgBmNtvMNplZlZnd2tvrFxGRFOvN3wGYWRR4A/gboBp4Cbjc3V/vtUaIiAjQ+3sA04Aqd3/L3VuBRcCcXm6DiIgAsV5eXwWwI+11NTD98JnMbD4wHyBKdEoxJb3TOhGRPq6ZRlq9xXris3o7ANpr9BFjUO6+AFgAUGKlPt0uPN7tEhHJCSt8aY99Vm8PAVUDI9NeVwI1vdwGERGh9wPgJWCcmY0xs3xgHvBYL7dBRETo5SEgd4+b2Q3A74AocK+7r+/NNoiISEpvHwPA3Z8Enuzt9YqIyJ/TL4FFREJKASAiElIKABGRkFIAiIiElAJARCSkFAAiIiGlABARCSkFgIhISCkARERCSgEgIhJSCgARkZBSAIiIhJQCQEQkpBQAIiIhpQAQEQkpBYCISEgpAEREQkoBICISUt0KADPbamZrzWy1ma0KaqVmtsTMNgfPg9Pmv83Mqsxsk5nN6m7jRUTk2PXEHsBfu/tkd58avL4VWOru44ClwWvMbCIwD5gEzAZ+YGbRHli/iIgcg+MxBDQHuD+Yv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umJQZ8KgDFBX6PBeyuBmaR+OPcU8MEs96scODuYHgC8EbQ/p/sWtKF/MJ0HrABm5Hq/0vr3D8CDwOMnyr/FoE1bgaGH1XK+b6Qup/O5YDofGNQb/crqX2YHfxgzgd+lvb4NuC3b7cqg3aP58wDYBJQH0+WkftR2RH+A3wV9Lgc2ptUvB36Y7X4d1sdHgb85kfoGFAOvANNPhH6R+pHlUuAC3guAnO9X0I6tHBkAOd03oATYQnBSTm/2q68OAR3tekK55rhdLykbzGw0cBapb8s537dgmGQ1qV+xL3H3E6Jf9PK1u3qZA783s5fNbH5Qy/W+jQXeBX4SDNv9yMz60Qv96qsBkPF1g3JUt6+X1NvMrD/wS+Bmdz/Q0azt1Ppk39w94e6TSX1jnmZmHf1GJSf6ZWnX7sp0kXZqfa5fac5197OBDwLXm9kHOpg3V/oWIzV8fLe7nwU0Elxe/yh6rF99NQCOdj2hXFNnqeskYcf3eknHlZnlkdr4P+DuvwrKJ0TfANx9H6kfOM4m9/t16NpdW4FFwAWWdu0uyNl+AeDuNcHzTuARYBq537dqoDrYAwV4mFQgHPd+9dUAeAkYZ2ZjzCyf1DWIHstym45Fzl8vKWjHj4EN7n5H2ls53TczO8nMBgXTRcBFwEZyvF9+Al+7y8z6mdmAQ9PAxcA6crxv7v4OsMPMDl3l80JSl9I5/v3K9kGdDg6MXELqjJM3ga9muz0ZtPchoBZoI5XEVwNDSB2M2xw8l6bN/9Wgb5tIO1IPTCX1j/pN4L847MBQFvp1HqndyNeA1cHjklzvG3Am8GrQr3XA/w7qOd2vw/p4Pu8dBM75fpEaK18TPNYf2i6cIH2bDKwK/j3+GhjcG/3SpSBEREKqrw4BiYjIcaYAEBEJKQWAiEhIKQBEREJKASAiElIKABGRkFIAiIiE1P8H+V8dIwvNZawAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "scale = 1500\n", + "x_v1, y_v1 = major\n", + "plt.imshow(mask_arr)\n", + "plt.plot( [center[0] + x_v1 * scale , center [0] - x_v1 * scale ], [center[1] - y_v1 * scale, center[1] + y_v1 * scale], color='red')\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "52d74129", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.8987189916850526\n", + "0.8987189916850526\n", + "[-0.9998769834130162, 0.015684962253283346]\n" + ] + } + ], + "source": [ + "import math\n", + "print(math.atan(-major[1]/major[0])*(180/math.pi))\n", + "print(math.atan2(major[1], -major[0])*(180/math.pi))\n", + "print(major)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "a1c8b4cf", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.8987189916850298\n" + ] + } + ], + "source": [ + "# orientation using mask and region prop\n", + "import os, sys, math, json\n", + "import numpy as np\n", + "from PIL import Image, ImageDraw, ImageFont\n", + "from skimage.measure import label, regionprops\n", + "from skimage.morphology import reconstruction\n", + "\n", + "region = regionprops(mask_arr)[0]\n", + "fish_angle = 90-region.orientation*(180/math.pi)\n", + "print(fish_angle)" + ] } ], "metadata": { diff --git a/Test_Data/INHS_FISH_18609.json b/Test_Data/INHS_FISH_18609.json deleted file mode 100755 index 0cc14d8..0000000 --- a/Test_Data/INHS_FISH_18609.json +++ /dev/null @@ -1 +0,0 @@ -{"INHS_FISH_18609": {"fish": [{"foreground": {"mean": 87.09627354520009, "std": 44.15772761903212}, "background": {"mean": 214.81002430155465, "std": 13.388967131670137}, "bbox": [757, 982, 2986, 1665], "pixel_analysis_failed": false, "extent": 0.495518626924609, "eccentricity": 0.9753541990809838, "solidity": 0.671066442280065, "skew": [0.2478602080721569, -0.07787108966393692], "kurtosis": [-0.7858921121608158, -0.6651787900333743], "std": [526.1135453290792, 124.76446621771217], "mask": {"start_coord": [1822.0, 1631.0], "encoding": "666766766676676677667757676766776766767676767677667767677677677766777777667777767676776076777607670767767776767667777607677776777767760760776076777767777677777777677676776777776776777677767777677767777777760777767666667666666666756566656654360077666766666666666666666676566665765676666766676666666666666766666666566666666666666666576666666676666566676666667666666766666666666766666566667666676666676667666667666666576666766666766676666666666666676665556656676566767077665445677666676776765666007555344323333323234323323322476677666753332433243243324324434470007577777707666655533334333333433344344544443344333324324455431144447765766776667667675676776676667776767767607677777675767777660776077777707075444777777707707777077607670707607707707770770770707777767666766766766766766766676676667676676676676766767667667667676667667666676666666766767677676766666676676676676766767667676666667666667666766667667666766676667666766676666766766767676767667676767666766767667667666666667666766766667666666676666667666766666766766667666766676666667666676666766667666766667676666767666766766676766766767666766676766676766676667667667676767767676776767676776767767676776776776776777677677767767677677677777677777677767676676776676767667676676766766767676676677770700700700007707770070000000000000101000110010101101101102101101102111111112111111111101021121110111111211112121210221221211221223121123122212121222221212221211222221221312211221222122212121221222122212112122222212122121211222221222222121221222221212221221321122222122221212222212212222121213222222122132121222212222212222212122221222222212122222221212212222222122221221312212222222222122222221221222221212212221212222122122212221222122212212222222212222222122222122222122222122222212222212222221222222212221222221221222221222222212222222121221222103232221222222222222132122222212222222212222222222212222222221212322112222232212222222322122222222122222222222222212222222222222222222222222212222222132222222232222222222222222222222322222222221123222222222222322322222222222322222223222222222222222223223222213322322222222221312222222222221232222221222312232231223222322222222222222222222222222222222222222221222222222122222222222212212212212212121221122122122121212122221222122122212122221122121212221212222122122212212212221221222212122122212212212221222122212212222122122222112222212221222212221222222122222232223222212222122213122212212122222222122221222222222122212221222222212212222222211313212222221232224321021234357553221132222117667566100223212234553222110761123346533113131076600222321346755431222221107023443223122221771032243443210001244323222222222224576756756665666676656576666553607666665675666666665666657575665344532556000755775666544677666565655407107675453556666600775465676665655566017556556566566656656666666566566656654666565666566654666667565466675666666665656656666655356560754756666656666665566666566665655432221212222212222221221222221222131022122231221222221222122131222122221221213122222212213212121132222121234321231221700222454321023222210217702134365322122131112321107024443103212231221212221313121231123211232112231222212222131222123212217232221222236556666667656665666656666566566666566575567754657565675666655322132212222365656075566566665766607754344432212222122223221222213113222222222213221224431001224343222231312222313123222122222213221321223226533145666775567075535666667565666766650076666665575444660117665666665657566660767601757665757566665666544075656775532346566665666675675766665666675365666656666665666656666656665576666656666666567665475765445331222211322222121023231221222222226654753331222221077621122223467544312232211170002222222212132213466543321222221007001321326565443132211312170765702221222122221244322100022444444321072212122223211132222453211002432456653566717667565446076575444543331113245313100022235321012433134433102310771334322445312101233212222322213132222566666666656666665675657666665543245444432122312466576666576566666666666107776656653313235653443223332346655607754566666566766666676665667665757666754660765665765467765566501765576665665607666666554665767566666656666666666666666557546777546566567666775754665666666666665532223222222221232222222222223222131222222210072223453312222222212232122222222222222444321012131223455322212311007613223112234666654431322131232222210007022443243322101217013453222222212222132222432222344457077665760756666666543222222222231326566666666666675666666667576666575332222132222222323310222222222343223322213100123455532231311223322232211233322223110343236657666676675666666576676666666656766666766666666676666666576666676656666666676666675667576666622222222222217666666666667666666766666666532222232666667650776532565757660221076666666666666766667544332222266666666667576665766666665657766533331233221322222222232222222222222223122222222222222212322222212232223122343323222211000245433222222311000353323101232222213324443453235766654601710766545666676666543223222232246567666766766666766666756676666667665346717676566766666666665455707666675667667566667656666676655331232323231223323222232232323222321132243112232432232222221043323100132443133321322222310001453331132212232212354310122334331123446667665766676543232222232322213323222223322232222322232223223222133222322222322322232232222322223222222322222322222321323223223223222322222322322222322232222232223223222232222313222322222322222322222322322232132223222222222223223222222223323222322222232222232222322222322222323322232222322322232222223222232232222322322223222232222322222322223223323222232223222232223222223222322222212433232222322222322232222322232232232223222322322322322322223223222232322322232322323222322222223222322222232222222332222222322222222222223222222222223232222222222222222222232222222210212122232111113322222212222122222222212222212232122212122223310221321221223221213212231122122222132222222122122222121213212145655655656565656656566565656656566565656655533111221212122212222122122122221122121112211032122122122122212221212321222122222122221323112132331122312122212222212212212222122122222210222321122222122122123112212231122223212102221123133311312121222221123212221223212221222122221022212232222221256656566666665665666654444543131222212211071134543211312222221222212222212222221222221122223122122221222222222212212222222222222122222231222212322122222132122222222222222236666666553123224666675665666666657665666661176676666665657665766656666566657657535322222122213132122212232122656656666656665666666666566566666566576566666557566754675543222221311223112321132212222122222221222122222222122122231223665666666566656533212365666076546656665656675532312222212222122222212222222222121456654322213221222222222566666666666665666567665665431222231222132212365666666666666566656666666565666676656665755665676575332231122222321312226566666656666665666655766656532222222212222222212213221222222212222223210022312222222222222212246666656653475653326566667566612222221000176655466566657656666666665532222122222222145666656756666554322121322222123266543132212222223311245444366566707755324666665666666653325566675601132100765666666566755343122322666666576656000076544446077676675666654444666666566676657566755775466767545665666666575656765676555676656656077545446532132212232122101443221032213310321702103232244312231312222222222107002132122222222222122222221322222222322122222221023322223122212356665434446666666610776566544665676566666665766666666755332266534466532212231322171132213177622225434666543221232222311001355324310170134532223235666765755076566666675666766656675666676656667656756576665007556766656656666656076656566775566666656666754543214322113310102224354431212225331711771222222321222222222232221232213222122232222544776557665331447666656670217666653245757666653447675667567667557666666666675756766666666666666666666657533132222222222132222222222222232222222222223222222222232213222231324310222222321223101143232534566011765654666666666675766576554077756666546765007567655775075666557766656675676665477666567666666555453223122311124532323221110222222244754321321000222232222223122321344543132211035322110034322222217677232332222102431222222122223112222231322222222132222221010245433122222225666657656666656666666656666666666656566765665666765656756666666666666665667666654507075540767666665754546607217665444546000007554454717654775466540776676545666654323122446765332225577665675676656667666676566543223122322312234666655656653322212332123232221070071232454444322322222223211113122222121222112210222212222117211713544322222107221143322102222225665665667765346666566566666566556655565666556566665565556565554544500001010076507765467776546075545666721177757667666653312346675443246600766701077576666577667556676665666766576077535660076666753443213332223213222223222172443210023123222123256657665353322217023214453222343233123117110225544445435555312322213323112170223444433265076666765767656677665554322133213223232212222466666656666666566655707665466660760766666675766576666532235666666667666666666676666666666667666666666766676666666707666667667766677666667665677666666666666676667665333222232222232222223222222232222322234434324312212223253121322222223222222223223122232322123224576676543223221143232222210002323310144322223321100224432231212323322222222210224331223121432222222222222222222322223226566666666665576665446607756653531223322123212211243122322222221003323222221231222222222225456666566755756654444533223322121102213533222123170124453223221221032234656566766565454765440077076535346755710076567755666676656666666666666666665766666665322322213131322443221761223122244754453223177122171223131222246666666665322324533110022222225756534655676666666666766666667666666666667675665331222322222322222222223222222223222222331223122355607567666665766757547675353222222356666756666667665766667666666533222222322221322223222222222232224665346753322223213123107666666660122102222234431102232132222466666555766665323222222231223217671232245322334576666676676567666766666666676666766666676666702176655465532222223223222232222313222322222322222232222322222322222223223132222223107123265534666766666666667666667666766576676657667576666676756507667666667653432232232223223311322232222345676666676676657766667576666667666766666756767566754332223213222322223222223222322223221332222222322222322322222232223222223221010766667666676666666675760132222232223132313222222453311024443653222222313224666666667666543222223221322223132366666766666675667676576666667666667666667666676667666667666676676666766532324666654323222322322322232222232322232222322322322223222232222331223222323222223223222210721766675350000756666667666667071224433112231223122214366532233332233122346667666666546567756766766666676676676666757667666676666767666667665346532232223223213112232232226665322223223132322312331235676666766757666676676666676666775676667666757676666676766676667666660765766766766576677666676676567776676666755332222332322223232223222322322322232232222322322232232232222323222232232223223222322232223232222322223223222232222322322107666676666776656767666776603222223232133122322232231000223132222224465323132222344576676676577666533223222231332476666677654766766766766667666766757666766675432322232223135667666677576676676676667667666676676667543223222323222322322322223223223223222322232222322324310232222322322222232232223666653466711766554433132231104443576667675775753322322323222357676666767666607657666677667667666676675777576676675776545432232322322322322322322223223223222323222232222332222322223223222357657766667665322322313322322222322365766607575332323232476766667766666677665432232322246676766676676666767660007545767667667766667766776666776666776676676767667667766766767666767666760713232322322322322232323222322322322223322232323222322323232222332231004432322232100077666676676676677566766766667676667667667667667667667667667667667667667667577667667667576656007676676676577676676676654443322332223232232232322323222323232323223223232322322232323223232232232323223223223223322322322322323223232232223232231332232232222332232231323222323222232232222347666676766676675667667756676676676676676676676677577666677666676767667676607567676667676676676676677667533223322323223232243466607667666767676776676676676677667676766776676767667667767666767676677766667766544333223312432223233232223322323232223233223223232322323232322322321332323223223222323222332233232231323232232231324322232223222233222321177666675767666766766766766776676666777667667667766760022332223322322322332232232232322323222233223123223223232222322322322246666676766667666532322322322223223223117760222325443100134653313223121022354335767577567567757576666766756076567667666766675766766766676667676577757766775757766666176766765454467666766076666667766600755760122231433133223114432232104443210107757766776666777566776677667543235546670117175535566767676676676760766666776667676676676677667766775407766767676660766676767667767667766653434453314313432321122354322224332222433222332124322332331223322232432133232322243100253431232332233231224312232332243102333223310134432232213332431222233133312223433101321234443102222531312243357765407757754577666666076576667676666775767766667675757677567766766677567676766660766667676667766667766767576767667667660766667676667767667667766676767676667766766677667676676776667676767666767667676766767767667667766767667676767676676666766766766767676766767676677666767666767676766676666766766766767667666767667666676667666766776766765766766667667676676666676767667667676666767667676667667667676767667666767677666666666676667666676676666667666656666666676666667666666666667666676666656666666666666666667666666666666666666666566666666666666576666666666666666666666656666666665666766666666666666666666666666566666666666666666766666666666756666765666666666666666766676666666545432212232221325466556766566575666666666666576666547755432222222222222222223222222322222232222222322324666676666666666666755676676666666666666666666666667656676656676656543243334766666667660024311077667176554444655400775667534766077666656576717654367576607546666667656676666766533223222222222332222322312233222123123222132332222232222223222322222232222232222313221322366666667666666666676666546676666665507754544577017577766654322266666655444322213214311345322100243243310345677755570765765476007547765470076566666577754675775766775567544466676617565675760100775345765465532222103432322232232223222322222321317103132223222322222331322223232322232222232232232223243550077666666766666766667533325446776657543233143222222232325666667567776655446766567675347534435432322232322221024343223214310013222444434667666766766676577666756076666666766767666676766577667676544465654332222233122223233321222222255660754675766676677666676543332222332322223433134322232353310034456554667762223107677676665346677010766776533446677710760755467667677577676776676767667767676677667766776676677667776767667766765076767667766767666677676676676776676754323322332223333222332323321232234323332322323311022332444432322224312333223233223322323222332332232313323232323223332232232323223223313223323233132332223323222322467666676666767676676756776677666675532554322532103122122354324313210014453234312431210245322324465466766676677666767656532234322532244322332222343223243132324324765077655347000757776576676576600007544477660076760775667677676677076662222107666776754466767767667676776677676776677677676767677767676767767677667767767766776767676767766767676776767676767667776675432332323233323232332322243323323223323232324432224443222233232253222233233310333343213323243334432213443332103326576554775445323333210003107670331344543555444607667667667676677607667676776767676767677676767657766766767676767767767667776777676677776677767677676767677767677766777677677767676676767677776776767677677667767776767666556676767767767676766666766665654545543332667656665453443266665757666666654431232322222322324366666667576653531232257666666766666654077655332232232322222322322223256676666666543232336540766546667544444666766667567675334322332223444323223223232431232366667676657540776557666676667544322322322333233222436576666607566766666767666765326553122243331343447765607667544333243123432431323244777665767757675447577665323232432343543532223334356666766007676776676076665343223333323243243235566667577667667667766766776676766776677676766766767667676675400776665476600717665076607570767660766777667533322543223332332432343323223343433123243245322223335322576776666076707653500076672107665607607777756757122107776076545347660000017765457760171755467667760775707576775070766775607666107677677566762177760757776675443353114335754432232244543223323323343143432333322333333243323322333322443332233233143323233332244666077565432133333332211072432233247660754443314323332222432431332322322102453333310433321332243317244"}, "cont_length": 4.7179585059491735, "cont_width": 1.5034970917438464, "area": 4.504737267877855, "feret_diameter_max": 5.63784148317858, "major_axis_length": 5.409564627019281, "minor_axis_length": 1.1935930231741352, "convex_area": 6.712803657074888, "perimeter": 52.52747621291417, "oriented_length": 0.014144178833632831, "oriented_width": 0.004533222436938909, "centroid": [1781, 1306], "has_eye": true, "eye_center": [953, 1190], "side": "left", "clock_value": 9, "primary_axis": [-0.9962345543010771, 0.08669897817468328], "score": 0.7899301648139954}], "has_fish": true, "ruler_bbox": [1108, 2473, 4760, 3700], "has_ruler": true, "scale": 390.4231030597885, "unit": "cm", "fish_count": 1, "detected_fish_count": 1}} \ No newline at end of file diff --git a/Test_Data/INHS_FISH_18609_image_lm.png b/Test_Data/INHS_FISH_18609_image_lm.png deleted file mode 100644 index ec52f71a2942599214ae19f132f14bb3717e9a19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5548 zcmbtY_ct5v_qS3}t0-EfR%<0_%?hP8s`d;KBdIM$QL&1miVC$yQmVB{L{h7@sXaQ7 zn59%}wUpLgpS=Hq?+@Sm!*lL=&VAi+o_o%HJ@>h}sXqI8f%9~9bnFKAbuH=W7)5CM z9*}`{q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yJD2Ej@6~LU-dkjq6>KzZK7_h~Q#|T2HEThDASD0TA@$eQdj}OK2?>@_1zH&j2iN|(UaTLjkLNdOvrDk^q# zl0i^{-~9;_&Xca5(5mvaVh>v>sa|w^)LOUe6{DB2h}df}Y_T#^H~!67oP#TTNU5!i z*9ZzU|3Q3jpxs>GAqGvC4|lrmZq3c1{+lt|r}|Zbsiw?~vZ{e+qv;B95++|yFN|l zRA1i_6l2l`hFxWBmJ17+*CO<*Zy{kMg1ywsE!1=Y( zXf93!RUcO>KzvM-g8v!QRxdxMRN2=)#)vE6H)IWCcfSs0PPPO1{EJG-B24Fk!Ll>i zOVu-9d8TV=mrZ$=X><>NW!N>y37R13C$Px?`O^TK+#Gf`$qO*LDNL#?8n8^$^uqY< iNB`TV{y!x8*RhuBSuf^h*`=@lxiQc))g@{pWB&(GcZKf& diff --git a/Test_Data/INHS_FISH_18609_landmark.json b/Test_Data/INHS_FISH_18609_landmark.json deleted file mode 100644 index c002357..0000000 --- a/Test_Data/INHS_FISH_18609_landmark.json +++ /dev/null @@ -1 +0,0 @@ -{"1": [98, 38], "2": [51, 147], "3": [38, 326], "4": [71, 439], "5": [107, 599], "6": [], "7": [162, 586], "8": [163, 498], "9": [176, 416], "10": [], "11": [122, 188], "12": [100, 189], "13": [139, 120], "14": [80, 77], "15": [80, 120], "16": [64, 100], "17": [97, 104], "18": [80, 99]} \ No newline at end of file diff --git a/Test_Data/INHS_FISH_18609_measure.json b/Test_Data/INHS_FISH_18609_measure.json deleted file mode 100644 index 4f2b27c..0000000 --- a/Test_Data/INHS_FISH_18609_measure.json +++ /dev/null @@ -1 +0,0 @@ -{"SL_bbox": 584, "SL_lm": "None", "HL_bbox": 152, "HL_lm": 151.01, "pOD_bbox": 39, "pOD_lm": 42.95, "ED_bbox": 44, "ED_lm": 43.0, "HH_lm": 77, "EA": 1134, "HA": 9397, "fish_angle": 4.89, "scale": 390.423, "unit": "cm"} \ No newline at end of file diff --git a/Test_Data/INHS_FISH_18609_presence.json b/Test_Data/INHS_FISH_18609_presence.json deleted file mode 100644 index 7548da1..0000000 --- a/Test_Data/INHS_FISH_18609_presence.json +++ /dev/null @@ -1 +0,0 @@ -{"dorsal_fin": {"number": 1, "percentage": 1.0}, "adipos_fin": {"number": 0, "percentage": 0}, "caudal_fin": {"number": 1, "percentage": 1.0}, "anal_fin": {"number": 1, "percentage": 1.0}, "pelvic_fin": {"number": 2, "percentage": 0.9156065777226187}, "pectoral_fin": {"number": 1, "percentage": 1.0}, "head": {"number": 1, "percentage": 1.0}, "eye": {"number": 1, "percentage": 1.0}, "caudal_fin_ray": {"number": 0, "percentage": 0}, "alt_fin_ray": {"number": 0, "percentage": 0}, "trunk": {"number": 2, "percentage": 0.9499680160833409}} \ No newline at end of file diff --git a/Test_Data/INHS_FISH_18609_segmented.png b/Test_Data/INHS_FISH_18609_segmented.png deleted file mode 100755 index 3237b665b8d045cd5bba39a069c9d6c6a07e7ac0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4083 zcmai1`#;m)AKzvx%w3}oMecnV35&`#v~ta5+uO9f%g8Nq8Cu9xDjA5r7}{AF0SA8{RckhhjU)9$9cV;uk$+Ryw2l1uN`y4N=vFpLLd<7qemP( zArP@$BKfB{Ow@<8m0=(dSrS%*Q47AcG4Hl($mVvi)y1?mJWUy+V@ zti?|5&{yVb<{%y`0JbXfQ6V?FVEN+cU4?AJ-5(A!=ev58~&otP{n(QHWLT70;Q68|B2f|7jo;Q4MKQaJy+3~ybIl2w{ zasbx_q`P|1v4JEf5Nb-pXp=COITU#sq8BbW5`%INH_xP4+~L9kVT`!KG`dt{#{YdN zuB6Ch-aETLKKwnD&ZAiZDhzp7f~j`Yz(}`wO#Tlr1xxa{-b>YCC+EanBtOZnOY)Ek z@%#>nxC_?Dg=@I>ldn1|ZXs^8Nsg@ZR}fM!hOTY&iW%l0j=}M+g=zB7(V`5DO3Jrq z_rkX5vE8)FCc4*+e#txaNCR9g^JaAvn^D@j8NRLn+K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