From 8d60573207eca287a6801aed5b97a63533eebebc Mon Sep 17 00:00:00 2001 From: Thibault Tabarin Date: Wed, 29 Jun 2022 21:15:29 -0400 Subject: [PATCH] update name for the measurment notebook update + new test_Data Update README.md fix error .json serialization... in Moprhology_main.py Update README.md remove cpython-38.pyc remove __pycache --- README.md | 31 +- .../Morphology_dev-checkpoint.ipynb | 1063 +++++++++++++++++ Scripts/Morphology_dev.ipynb | 754 +++++++++++- Scripts/Morphology_main.py | 16 +- Scripts/Traits_class.py | 66 +- .../__pycache__/Traits_class.cpython-37.pyc | Bin 12214 -> 0 bytes .../__pycache__/Traits_class.cpython-38.pyc | Bin 13135 -> 0 bytes Test_Data/INHS_FISH_18609.json | 1 + Test_Data/INHS_FISH_18609_image_lm.png | Bin 0 -> 5499 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 0 -> 4083 bytes 13 files changed, 1865 insertions(+), 69 deletions(-) create mode 100644 Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb delete mode 100644 Scripts/__pycache__/Traits_class.cpython-37.pyc delete mode 100644 Scripts/__pycache__/Traits_class.cpython-38.pyc create mode 100755 Test_Data/INHS_FISH_18609.json create mode 100644 Test_Data/INHS_FISH_18609_image_lm.png create mode 100644 Test_Data/INHS_FISH_18609_landmark.json create mode 100644 Test_Data/INHS_FISH_18609_measure.json create mode 100644 Test_Data/INHS_FISH_18609_presence.json create mode 100755 Test_Data/INHS_FISH_18609_segmented.png diff --git a/README.md b/README.md index bbcde99..e65f4f0 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,11 @@ img_seg = tc.segmented_image("image_segmented.png") ## 4- Input and Output The main script is Morphology_main.py The usage is python Morphology_main.py input_file.png metadata.json measure.json landmark.json presence.json image_lm.png +Code to test using the data provided in [/Test_Data/]() +``` +Morphology_main.py Test_Data/INHS_FISH_18609_segmented.png Test_Data/INHS_FISH_18609.js +on Test_Data/INHS_FISH_18609_measure.json Test_Data/INHS_FISH_18609_landmark.json Test_Data/INHS_FISH_18609_presence.json Test_Data/INHS_FISH_18609_image_lm.png +``` + input_file.png : segmented fish image generated by [Maruf code](), [example here](https://github.com/thibaulttabarin/Morphology-analysis/blob/main/Test_Data/INHS_FISH_000742_segmented.png) + metadata.json : generated by [drexel]() [example here](https://github.com/thibaulttabarin/Morphology-analysis/blob/main/Test_Data/INHS_FISH_000742.json) @@ -120,6 +125,26 @@ You will need to use [Morphology_env.yml](https://github.com/thibaulttabarin/Mor We use github action to create a container what run the main script [Morphology_main.py](https://github.com/thibaulttabarin/Morphology-analysis/blob/main/Scripts/Morphology_main.py). 1. The workflow to build the container is defined [here](https://github.com/thibaulttabarin/Morphology-analysis/blob/main/.github/workflows/Deploy_Morpholgy.yml). 2. The Dockerfile definition is [here](https://github.com/thibaulttabarin/Morphology-analysis/blob/main/Dockerfile) - 3. Pull command : docker pull ghcr.io/thibaulttabarin/morphology-analysis/morphology:0.0.2 or singularity pull My_morphology_name.sif - 4. To access the instruction Run : "singularity run My_morphology_name.sif" or - 5. Usage : singularity exec My_morphology_name.sif Morphology_main.py + 3. Pull command : + ``` + docker pull ghcr.io/thibaulttabarin/morphology-analysis/morphology:latest + #or + singularity pull My_morphology_name.sif docker://ghcr.io/thibaulttabarin/morphology-analysis/morphology:latest + ``` + 4. To access the instruction Run : " + ``` + singularity run My_morphology_name.sif + ``` + 5. Usage : + ``` + singularity exec My_morphology_name.sif Morphology_main.py + # test with + singularity exec My_morphology_name.sif Morphology_main.py Test_Data/INHS_FISH_18609_segmented.png Test_Data/INHS_FISH_18609.json Test_Data/INHS_FISH_18609_measure.json Test_Data/INHS_FISH_18609_landmark.json Test_Data/INHS_FISH_18609_presence.json Test_Data/INHS_FISH_18609_image_lm.png + ``` +## 7- Development tricks + +If you want to test neww version of Morphology_main.py (upudated version on your local computer) you can use the container by bind the local folder (here, Scripts/) containing the updated version of Morphology_main.py and /pipeline/Morphology is where Morphology_main.py is expected to be in the container. +``` +singularity exec --bind Scripts/:/pipeline/Morphology morpho.sif Morphology_main.py Test_Data/INHS_FISH_18609_segmented.png Test_Data/INHS_FISH_18609.json Test_Data/INHS_FISH_18609_measure.json Test_Data/INHS_FISH_18609_landmark.json Test_Data/INHS_FISH_18609_presence.json Test_Data/INHS_FISH_18609_image_lm.png + +``` diff --git a/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb new file mode 100644 index 0000000..87e6a5a --- /dev/null +++ b/Scripts/.ipynb_checkpoints/Morphology_dev-checkpoint.ipynb @@ -0,0 +1,1063 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "98a152cd", + "metadata": {}, + "source": [ + "# Development for morphology trait extraction\n", + "\n", + "This notebook gives examples and a platform to develop and visualize extraction on morphological traits\n", + "The functions used are define in a class \"Traits_class\" that you can find in the same folder (Morphology-analysis/Scripts/Traits_class.py).\n", + "If you want modify the \"Traits_class.py\" reload the module by running the first cell to see the modification appear in the notebook.\n", + "\n", + "**Study case:**\n", + "To illustrate the morphology workflow and functionality, we are using the 2 images :\n", + "\n", + " + Morphology-analysis/Test_Data/INHS_FISH_000742_segmented.png\n", + " + Morphology-analysis/Test_Data/INHS_FISH_18609_segmented.png\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "602dc370", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# load what you need\n", + "import Traits_class as tc\n", + "import json, sys\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from PIL import Image, ImageDraw, ImageFont\n", + "from IPython.display import Image\n", + "import importlib\n", + "import skimage as ski\n", + "importlib.reload(tc)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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", + "metadata_file = '../Test_Data/INHS_FISH_000742.json'" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "2289de98", + "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", + "measurement = img_seg.measurement\n", + "landmark = img_seg.landmark\n", + "presence_matrix = img_seg.presence_matrix\n", + "img_landmark = img_seg.visualize_landmark()" + ] + }, + { + "cell_type": "markdown", + "id": "070251e3", + "metadata": {}, + "source": [ + "## 2 - Explore the output\n", + "\n", + " 1- Presence Matrix\n", + " 2- Landmark\n", + " 3- Visualize landmark\n", + " 4- measurement" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "ae9eb407", + "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': 1, 'percentage': 1.0},\n", + " 'pelvic_fin': {'number': 1, 'percentage': 1.0},\n", + " 'pectoral_fin': {'number': 1, 'percentage': 1.0},\n", + " 'head': {'number': 1, 'percentage': 1.0},\n", + " 'eye': {'number': 1, 'percentage': 1.0},\n", + " 'caudal_fin_ray': {'number': 0, 'percentage': 0},\n", + " 'alt_fin_ray': {'number': 0, 'percentage': 0},\n", + " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# presence dictionnary\n", + "presence_matrix" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "b24d03d1", + "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": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# measurement dictionnary\n", + "measurement" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "ffda5440", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'1': (148, 36),\n", + " '2': (66, 148),\n", + " '3': (21, 301),\n", + " '4': (106, 566),\n", + " '5': (112, 606),\n", + " '6': (150, 622),\n", + " '7': (203, 592),\n", + " '8': (200, 562),\n", + " '9': (242, 478),\n", + " '10': (279, 305),\n", + " '11': (217, 169),\n", + " '12': (162, 187),\n", + " '13': (224, 138),\n", + " '14': (136, 66),\n", + " '15': (134, 96)}" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# landmark dictionnary\n", + "landmark" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "8b7d1b1a", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAY90lEQVR4nO3dbW6jyrqA0Tooo7gjPIOILGR5EFt7gGcUkXV/4KYJxhgwUF9rqdXqdBzHSbvtJ28VOAQAAAAAAAAAAAAAAEjEf2LfAKAW99n3NifdCoAzCCxgT/MVNU9jAcUQWMB2n+TUJI0FlEFgAUvtnlOTNBZQgK/YNwBI2jlRBVAYEyyoXYIJZYgF5E5gQUUSbKlXNBaQNYEFMbVtO/PmhzLKqUkaC8iXwII4Zlrqk8zKPaq2kWJAagQWnG1hPy3PrDqjaiHtBUQhsOBUq6ZTkxeWUzuSX8BBnKYBMiCqDjL6xuotYC8mWHCefiL1/IdXLrtue2chpQV8yMMInK2LquHvpOb+5xfANiZYcJLnllrYWIZYSfFTK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j+2Pz8TF5JWADkQWOxMY20wSqvhX/7NLGm1lvVBIB6Bxf6a0IR8tmTFNZlWzxdoL2XtGzuBugKi8hjEURr3rnfe1tXfSxpfLdQ0j18AUZlgcSDLhRxOSwFJcpoGDpdaYyVymobh+Kpt2/73yT883rRQ2BFVQPI8TnE4a4Uz2rYdV9QgtkbvqlG/5Df8BZA8D1WcQWON9OOr58Ca+6hidmJNZpOWAgpiDxYncWhhvXQSUB+Bxan6UZbSKpyoAurmQZA4+kWg8z/v+IWQ+ZClPYAnjiIkISeMtf4m3ff30Z9rxnAP1vhdg11ZE+897kBCVQSwH4FFig4qrYmBWbzMWn6W0b8f0vfWffb7I5UAYrMHixSdtyP+ebnwnOS63cInp2CQUABpM8EiJ2uTK/HTQ6w6zZVzYgFkxASLnCQeTADQ8XQF0aw4xajxFUBWLBFCfDP9JK0AciSwIBWTL0oIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOTj/wGZVIJ92gsmjAAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Visualize landmarks \n", + "img_landmark" + ] + }, + { + "cell_type": "markdown", + "id": "100fd501", + "metadata": {}, + "source": [ + "## 3- Explore 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", + " 2. Import the image and Masks extraction\n", + " 3. Clean the mask\n", + " 4.\n", + " 5. " + ] + }, + { + "cell_type": "markdown", + "id": "493c71c2", + "metadata": {}, + "source": [ + "### 1- Masks extraction \n", + "\n", + " + Import the image : \n", + " + Function to convert the image.png in to a disctionnary with key = trait ('trunk', 'dorsal_fin'...)\n", + " masks = img_seg.mask\n", + " + Visualize the mask\n", + " \n" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "f9ce0bf1", + "metadata": {}, + "outputs": [ + { + "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" + ] + } + ], + "source": [ + "# Convert the image.png the dictionnary of mask\n", + "# 1- use the variable \"mask\" which is created by the function \"img_seg.get_channels_mask()\"\n", + "masks_dict = img_seg.mask\n", + "\n", + "print(\"This is the list of the trait :\",list(masks_dict.keys()))" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "fccc32b4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUFklEQVR4nO3dfXRU9Z3H8fd3ZkICieFBBQMJAp6IAhVE5EF3WytSkW2F1q3iI1q7VMWqtbsW2q2ntmuP1dbSs2qVaguWVhYfWtBaRWk9bUVUVFQeDM+V8KjIMxJI8t0/cjlNJZBJMpN75+bzOidn7vzmztxPePjk5jd37jV3R0RE4iURdgAREck8lbuISAyp3EVEYkjlLiISQyp3EZEYUrmLiMRQ1srdzEabWYWZrTKzydnajoiIHM6ycZy7mSWBFcAooBJ4HbjU3ZdlfGMiInKYbO25DwVWufsadz8AzALGZmlbIiLyCdkq9x7A+nr3K4MxERFpBaksva41MPZP8z9mNhGYCJAkeUYHirMURUQknnaz/UN3P76hx7JV7pVAWb37pcDG+iu4+zRgGkCxdfFhNjJLUURE4ulF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light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# Visualize the mask for a specific trait\n", + "trait_name = 'head'\n", + "plt.imshow(masks_dict[trait_name])" + ] + }, + { + "cell_type": "markdown", + "id": "486170f3", + "metadata": {}, + "source": [ + "### 2- Clean the mask and presence matrix\n", + "\n", + "Clean the mask involve:\n", + " + Assessing the number of blob and decide what we keep and what we discard\n", + " + Filling up hole in the blob\n", + " + Create the presence matrix with Number of blob and the percentage of the biggest\n", + " \n", + "We will use the module skimage.measure.regionprops to manipulate the mask, find the individual blobs and access properties of the \"region\" (blob) such as centroid, area, bbox... (reference : https://scikit-image.org/docs/dev/api/skimage.measure.html)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b65c0131", + "metadata": {}, + "outputs": [], + "source": [ + "# Example of problem, the head trait mask as hole inisde correspond to the eye.\n", + "# we want the whole head especially if we want to calculate area\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "b92fee15", + "metadata": {}, + "outputs": [], + "source": [ + "# Create a regionprop that has been cleaned\n", + "# Remove hole \n", + "# Keep only the big blob\n", + "# regionprop_object has mutiple properties\n", + "regionprop_head = img_seg.clean_trait_region(masks_dict['head'])" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "be28ead1", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area : 16034\n", + "centroid : (148.13259323936634, 119.70369215417239)\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAgG0lEQVR4nO3deWBU5dXH8e+ZyQ6EAIGwE0A2WWVfKi8qFEEKuOOCW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Kdu7/UopSzT8SsUpDb9ScUrDr1Sc0vArFac0/ErFKQ2/UnFKw69UnPp/p9FEZdFiSVEAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# Explore Regionprop_object properties\n", + "# full list of properties is here https://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.regionprops\n", + "print(\"area :\", regionprop_head.area)\n", + "print(\"centroid :\", regionprop_head.centroid)\n", + "# display the image of the new mask correponding to the clean trait mask\n", + "plt.imshow(regionprop_head.image)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "f5eea310", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACKCAYAAABRuwqNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAOe0lEQVR4nO3de3CV9Z3H8fc3MQESLga5NAu0RKHUy2zRMqjFui5oC2grbbcV29qMYxd3BVfEdQeG6bo7W2fcdRZ3xql2rdqiVVlXpbKOlSKy22mpXAVKDBEENFlCAspyCZfknHz3j/OkHsjJ/Zw8T558XjNnznN+58l5PlzyycnvPOf8zN0REZF4yQs7gIiIZJ/KXUQkhlTuIiIxpHIXEYkhlbuISAyp3EVEYihn5W5mM82sysz2mNniXB1HRERas1yc525m+cB7wA1ADbAJuNXd3836wUREpJVcPXOfCuxx973u3gisAG7O0bFEROQc5+XocccA1Wm3a4Ar29q50Ab4QIpzFEVEJJ6Oc+Swu4/MdF+uyt0yjJ01/2Nm84B5AAMp4kqbkaMoIiLx9Ka/9EFb9+VqWqYGGJd2eyxwIH0Hd3/C3ae4+5QCBuQohohI/5Srct8ETDSz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WM15D6dXAHsC24zI5gzj8F3gly7gT+PhiPVM5zMl/HJy+oRionqbns7cGlouV7JWo5g+NOBjYH//a/BEoimrMI+AgYljYWuZzdvegdqiIiMRT2tIyIiOSAyl1EJIZU7iIiMaRyFxGJIZW7iEgMqdxFRGJI5S4iEkMqdxGRGPp/FDdh7KZwHJoAAAAASUVORK5CYII=\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_18609_segmented.png'\n", + "img_seg_2 = tc.segmented_image(segmented_file)\n", + "masks_dict_2 = img_seg_2.mask\n", + "plt.imshow(masks_dict_2['pelvic_fin'])\n" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "6bb2a90a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAADhCAYAAADRVO5tAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAOk0lEQVR4nO3df6zdd13H8eeLWlo2RFrYlrJOB0lBCIEOb8ZwxsyVaZlk85+ZzWD6x5L+g3EoCes0McGEZCaG4B/GpBGkEQQnP9yyEEctLEZDgAJldJStkx+jrK4wQKYkSwdv/zjfytnZ/XHur/P9fnqfj+Tke77fe849r55777vvvu/n+22qCklSe57TdwBJ0spYwCWpURZwSWqUBVySGmUBl6RGWcAlqVGrKuBJ9iZ5KMkjSQ6sVShJ0tKy0nXgSTYBDwPXAaeAzwO3VNVX1y6eJGkhP7eK514JPFJVXwdI8mHgRmDBAv7cbKmtXLiKl1zYy1/z43X5vLP08AMX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OqLmf0ffSpqnpLn5lgdOG3JD9/7j6j2enxvnNV1X8B307yiu7QHuCrfecacws/G59Av7keBa5KckH3M7mH0S98h/JePdMsB+7A9cDDwH8Cf9rX4J/RN8tp4Cyj7uRW4EWMfil2sttun3GmX2M0UnoAONbdrh9ArtcAX+pyHQf+rDvea66xfNfws19i9v1evQz4cnd78Nz3eN+5ugy7gaPd1/GfgW0DyXUB8ATwC2PH+v46vpNRk3Ic+HtgS9+ZFrp5JqYkNcozMSWpURZwSWqUBVySGmUBl6RGWcAlqVEWcElqlAVckhplAZekRv0f1OlppFqvNtEAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# During the clean step we remove the small blod and keep only the big one\n", + "regionprop_pelvic = img_seg.clean_trait_region(masks_dict_2['pelvic_fin'])\n", + "plt.imshow(regionprop_pelvic.image)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "03bf6f15", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'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}}\n" + ] + } + ], + "source": [ + "# The presence matrix is created using the following function\n", + "presence = img_seg_2.get_presence_matrix()\n", + "# or directly access the variable\n", + "presence = img_seg_2.presence_matrix\n", + "print(presence)" + ] + }, + { + "cell_type": "markdown", + "id": "4f2d1e48", + "metadata": {}, + "source": [ + "### 3- Collect properties and landmark\n", + "\n", + "In this section there are multiple small functions to calculate and extract what we want from the mask, using either direct calculation on the mask or using the regionprop_object. You can explore the class on the repo, there are plenty of small functions with some redundancy (with different way calculate the same value) and some that are not necessarly used and function in jupyter notebook (particular visualisation functions)\n", + "\n", + "List of funtion: \n", + "\n", + " + img_seg.landmark_generic(trait_name) : return the most front_point , back_point, top_point, bottom_point, centroid, new_mask\n", + " + img_seg.landmark_5_7 : calculate specifically the landmark 5 7\n", + " + img_seg.all_landmark() : combine all the landmark in a dictionnary\n", + " + img_seg.visualize_landmark() : plot landmark on the original segmentation\n", + " \n", + "Now play" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "b64417f6", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "most front point: (148, 36)\n", + "most back point: (162, 187)\n" + ] + } + ], + "source": [ + "front_lm, back_lm, top_lm, bottom_lm, centroid, new_mask = img_seg.landmark_generic('head')\n", + "print(\"most front point:\", front_lm)\n", + "print(\"most back point:\", back_lm)" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "8208aa2c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'1': (148, 36),\n", + " '2': (66, 148),\n", + " '3': (21, 301),\n", + " '4': (106, 566),\n", + " '5': (112, 606),\n", + " '6': (150, 622),\n", + " '7': (203, 592),\n", + " '8': (200, 562),\n", + " '9': (242, 478),\n", + " '10': (279, 305),\n", + " '11': (217, 169),\n", + " '12': (162, 187),\n", + " '13': (224, 138),\n", + " '14': (136, 66),\n", + " '15': (134, 96)}" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# landmark dictionnary\n", + "img_seg.all_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "99b54f95", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAY90lEQVR4nO3dbW6jyrq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B1ZFZpMXmKmAZgcUK5wdWR2YRma4CVhJYrBOrsYLM4ny6CthKYLFOxMDqyCwOp6uAjwksVoveWEFmcQRdBexHYLFFCo3VUVp8SlcBBxBYbJFOYHVkFltIK+AwAouNUmusjtLiDVEFnEJgsVGagdVTWoxJK+BEAovtEm+sILMQVUAkAovt0g+sjswqkHIC0iaw+EgujRVkVvo0E1AQgcWnNBYrXK8HXnnTHHjlAGsILD6VUWAFjXWC2y3cE7hLiC0gKoHFDjRWpRJpqVc0FhCPwGIfGTVWFYE12s/0nEFv4yPlclpOYwGRCCx2k0tjlRZYh+5qyp3AAiL5in0DKEcTmlwaK3uiCiBtAos9aaxPtF+//j+2Pz8TF5JWADkQWOxMY20wSqvhX/7NLGm1lvVBIB6Bxf6a0IR8tmTFNZlWzxdoL2XtGzuBugKi8hjEURr3rnfe1tXfSxpfLdQ0j18AUZlgcSDLhRxOSwFJcpoGDpdaYyVymobh+Kpt2/73yT883rRQ2BFVQPI8TnE4a4Uz2rYdV9QgtkbvqlG/5Df8BZA8D1WcQWON9OOr58Ca+6hidmJNZpOWAgpiDxYncWhhvXQSUB+Bxan6UZbSKpyoAurmQZA4+kWg8z/v+IWQ+ZClPYAnjiIkISeMtf4m3ff30Z9rxnAP1vhdg11ZE+897kBCVQSwH4FFig4qrYmBWbzMWn6W0b8f0vfWffb7I5UAYrMHixSdtyP+ebnwnOS63cInp2CQUABpM8EiJ2uTK/HTQ6w6zZVzYgFkxASLnCQeTADQ8XQF0aw4xajxFUBWLBFCfDP9JK0AciSwIBWTL0oIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOTj/wGZVIJ92gsmjAAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Visualize the landmark\n", + "img_seg.visualize_landmark()" + ] + }, + { + "cell_type": "markdown", + "id": "bd018bc8", + "metadata": {}, + "source": [ + "### 3- Measurement part\n", + "\n", + "Functions to calculate what we need to measure what we want!!!\n", + "\n", + " + img_seg.get_distance(a,b) : measure distance between two point\n", + " + img_seg.measure_eye_area()\n", + " + img_seg.measure_head_area()\n", + " + img_seg.measure_eye_head_ratio()\n", + " + img_seg.calculate_triangle_area(point_1, Poit_2, point_3)\n", + " + img_seg.measure_eye_diameter()\n", + " + img_seg.all_measure() create the following dictionnary using the previous fucntions:\n", + " + measure['SL'] = self.get_distance(landmark['1'],landmark['6'])\n", + " + measure['EA'] = self.measure_eye_area()\n", + " + measure['HAt'] = self.calculate_triangle_area(landmark['1'],landmark['2'],landmark['13'])\n", + " + measure['HAp'] = self.measure_head_area()\n", + " + measure['HCL'] = \"WIP\"\n", + " + measure['ED'] = self.measure_eye_diameter()\n", + " + measure['HL'] = self.get_distance(landmark['1'],landmark['12'])\n", + " + measure['HD'] = self.get_distance(landmark['2'],landmark['13'])\n", + " + measure['pOD'] = self.get_distance(landmark['1'],landmark['14'])\n", + "\n", + "Now play!" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "f4bf0c4f", + "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": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.all_measure()" + ] + }, + { + "cell_type": "markdown", + "id": "e033c2f9", + "metadata": {}, + "source": [ + "## Development Section\n", + "\n", + "This is where we make a mess!!!" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "add5f243", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "82724" + ] + }, + "execution_count": 25, + "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+c8W6vtL9qv7cNOR9EhKqsPoate07u9A973Lxgxuwey81nuVLXyoO2nTVpZ9KC0lsGVrHUUoEv3C0nM/WPHac995YR8KDzdcgvHBXx4hvdxwid+MJEv0MDrvFbkSAqH/fX5Y0JSHnrh4z7Ejvt5MYNEyr0ITiQiV9dyV3MP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KuvSrYu/eAVSsoi9m2cWVbXPagbBvL3mZ2TCXV46JtzOx3wCbn3KzqnlJBWcy0i9fJXfutVmzj7m0MQ6+bQuVx1V4V7d2L2mYvzrltwBRgIGqbk4BzzCybsiHe08zsZeK0XbxO7j8AHcysrZnVAy6kbA/WePc+MCz0fhjwXrnyuNif9kB796K2wcyamtnhoff1gTOAxcR52zjn7nLOtXTOtaEsl3zpnBtCvLaL13d0gd9SNhNiOfBXr+Px4Pd/DcgBSijrSVwJNAa+AJaFXtPL1f9rqK2WAL/xOv4wtsvJlP2J/BMwJ/TzW7WNA+gOzA61zXzg76HyuG+bcr/vAH6ZLROX7aInVEVEYpDXwzIiIhIGSu4iIjFIyV1EJAYpuYuIxCAldxGRGKTkLiISg5TcRURikJK7iEgM+v94zGEOtozB3AAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "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", + "np.all(pad_mask == erosion_trunk)\n", + "sum(sum(pad_mask))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "982c2856", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "d452f502", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(264, 474)\n", + "(262, 472)\n", + "1277.9453095790602\n", + "1277.9453095790602\n" + ] + } + ], + "source": [ + "print(pad_mask.shape)\n", + "print( trunk_mask.shape)\n", + "print(ski.measure.perimeter(trunk_mask))\n", + "print(ski.measure.perimeter(pad_mask))" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "5d3ae5d3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4\n", + "1427\n", + "(1495, 2)\n", + "1128\n", + "125136\n" + ] + } + ], + "source": [ + "contour_1 = ski.measure.find_contours(trunk_mask)\n", + "print(len(contour_1))\n", + "print(sum([a.shape[0] for a in contour_1]))\n", + "\n", + "contour_2 = ski.measure.find_contours(pad_mask)[0]\n", + "print(contour_2.shape)\n", + "\n", + "contour_ = np.logical_and(pad_mask, np.logical_not(erosion_trunk))\n", + "print(sum(sum(contour_)))\n", + "contour_3 = ski.measure.find_contours(contour_)[0]\n", + "print(sum([a.shape[0] for a in contour_]))" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "id": "ee1e920f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[array([[262.5, 145. ],\n", + " [262.5, 144. ],\n", + " [262.5, 143. ],\n", + " ...,\n", + " [261.5, 146. ],\n", + " [262. , 145.5],\n", + " [262.5, 145. ]])]" + ] + }, + "execution_count": 70, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAADdCAYAAABAMDLCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAooElEQVR4nO3deXhdVbn48e97hpyTpEmapJmTJmmbNG0RWiilBQdGBURBH+FWfyoIV8SrV1EEQcABRFFkUK+gVbiCIsgVB0BECloc2tKJFtqmmZo0c9Kmmeezz/r9cU4hpUmTZtpneD/Pk+ecs/ba+7xZ4tuVtddeS4wxKKWUiiwOuwNQSik1/TS5K6VUBNLkrpRSEUiTu1JKRSBN7kopFYE0uSulVASaseQuIheKSJmIVIrIzTP1PUoppY4lMzHPXUScQDlwAVAPbAU+aozZO+1fppRS6hgz1XNfBVQaY/YbY4aAJ4FLZ+i7l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0dlu9jdc18FVBpj9htjhoAnCezBGjWMMf8A3r510aXAo8H3jwKXjSh/0hgzaIypBo7sTxtxjDFNxpgdwffdwJG9e7VtAnqCH93BH4O2DSKSC7wf+MWI4qhsF7uTew5QN+LzqPutRqEME9iYnOBrerA8KtvrbXv3atvw5tDDTqAVWG+M0bYJeAC4iaNXy4jKdrE7uU9ov1X1pqhrr1H27h2z6ihlEds2JrDF5XIC21iuEpGTjlM9KtpGRC4BWo0x2yd6yihlEdMudid33W91dC1HtjEMvrYGy6OqvUbbuxdtm6MYYzqADcCFaNucBXxQRGoIDPGeKyK/Jkrbxe7kvhUoEpFCEYkB1hLYgzXaPQNcGXx/JfCnEeVRsT/tWHv3om2DiKSJyNzg+1jgfGAfUd42xphbjDG5xpgCArnkb8aYjxOt7WL3HV3gYgIzIaqAW+2Ox4bf/wmgCRgm0JO4BkgFXgYqgq8pI+rfGmyrMuAiu+OfwXZ5J4E/kV8HdgZ/Lta2MQAnA68F22Y38PVgedS3zYjf92zemi0Tle2iT6gqpVQEsntYRiml1AzQ5K6UUhFIk7tSSkUgTe5KKRWBNLkrpVQE0uSulFIRSJO7UkpFIE3uSikVgf4/w2y4BiGfKVsAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "contour_ = np.logical_and(pad_mask, np.logical_not(erosion_trunk))\n", + "plt.imshow(contour_)\n", + "list_contour = ski.measure.find_contours(contour_)\n", + "list_contour_2 = ski.measure.find_contours(pad_mask)\n", + "list_contour_2\n" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "id": "f5abdcdd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1495, 2)" + ] + }, + "execution_count": 88, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a =list_contour_2[0]\n", + "a.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "id": "a7e0885b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1280.7737367037953" + ] + }, + "execution_count": 93, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "distance = lambda a,b: ((a[0] - b[0])**2 + (a[1] - b[1])**2)**0.5\n", + "distance(list_contour_2[0][0,:],list_contour_2[0][1,:])\n", + "a =list_contour_2[0]\n", + "list_segment = [distance(a[i,:],a[i+1,:]) for i in range(a.shape[0]-1)]\n", + "sum(list_segment)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "84e350d9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAADcCAYAAACLbOFnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAjRklEQVR4nO3dd3xUVd7H8c9vJiEhRKoUKdKLoC4CAtaH1bWsDXdtuKxiAxV1RX3s7uPqa3XXvjZcUVx1dXWxIepaEGUVqUFAhVBCUYKhKEFJQpIp5/kjAwZJI5nJnfJ9v155zcyZO/f+OMo3l3PvnGPOOUREJLn4vC5ARESiT+EuIpKEFO4iIklI4S4ikoQU7iIiSUjhLiKShGIW7mZ2opmtMLM8M7spVscREZE9WSzuczczP7ASOA7IBxYA5zrnlkX9YCIisodYnbkPBfKcc2ucc+XAy8DIGB1LRER+Ji1G++0ErK/0Oh8YVnkDMxsHjAPw4x+cRfMYlSI7md9PsEVmrduFMuDAtluqfX9laQtC3zXZoz1tezkuEGhQjSJSd9sp/M4517aq92IV7lZF227jP865ScAkgObW2g2zY2NUSmrxDezPimurDvB9mu9gydCX6rinLnt97F8uPYevC9oA0O+69YS2VP8LQkQa7kP36tfVvRercM9n93ToDHwbo2OlFp8fG3QAWMXvz5UXZPHg8S/uerut/3OOyPTm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NDAI+KpS273ATZHnNwH3RJ73j/RRBtA90nd+r/8MMeyb/YBBkef7ACsjfZDy/UPFugnZkefpVCygM1x9s6t/rgX+BbwdeZ1y/eL1mftQIM85t8Y5Vw68TMUyfSnDOfcJsPVnzSOB5yLPnwNOr9T+snOuzDm3Fti5hGFScs4VOOc+jzzfDuxc4jHl+8dVKIq8TI/8ONQ3mFln4GTg6UrNKdcvXod7J2B9pddVLsmXgtq7irVriTy2i7SnbH/9bIlH9Q+7hh4WA5uB6c459U2FvwE3AOFKbSnXL16He52W5JNdUrK/qljisdpNq2hL2v5xFSuhDaRitbOhZnZgDZunRN+Y2SnAZufcwrp+pIq2pOgXr8NdS/JVbdPOla4ij5sj7SnXX1Ut8Yj6ZzfOuW3ATOBE1DdHAKeZ2ToqhnmPMbMXSMF+8TrcFwC9zay7mTUBRlGxTF+qmwaMiTwfA7xZqT1lljCsbolH1D+YWVszaxl53hT4FbCcFO8b59zNzrnOzrluVOTJR86535OK/eL1FV3gJCruglgN3Op1PR78+V8CCoAAFWcRFwNtgBnAqshj60rb3xrpqxXAr72uP8Z9cyQV/0T+Algc+TlJ/eMADgYWRfrmK+D/Iu0p3zeV/rwj+OlumZTrF00/ICKShLwelhERkRhQuIuIJCGFu4hIElK4i4gkIYW7iEgSUriLiCQhhbuISBL6fwONMOKw0iCYAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(trunk_pro.image)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "6ee0446b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90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pYJhgt72PaiJCLSG7iAmq1i2+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": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "caudal_fin = img_seg.mask['trunk']\n", + "\n", + "plt.imshow(caudal_fin)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "cf78ee7e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwga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SOYFCYA3B+3lRzblPti8Df4t6zpbewp6WaQsX9ojsRUnMrA8wlLq94sjlbEMXefkV8AOgtsFYFHM68Gcze8PMJkU059FABfC7YJrrATNrH8GcDV0EPB4sRzlni4Rd7s26sEdEhZrdzAqAJ4Fr3L3yYKs2MtYqOT0DF3lJNzM7C9jk7m809ymNjLXW3/sodz8BOAOYbGajD7JuWDmzqJvavNfdh1J3WpGDvZcW9v+jHOBs4ImmVm1kLNJdFXa5N+vCHiE7rIuSZIKZZVNX7I+6+1NRzVnP03iRlwwYBZxtZh8CM4GxZvZIBHPi7uuCr5uA/6Hu2sRRy1kOlAe/pQHMpq7so5az3hnAm+6+Mbgf1ZwtFna5vw6UmVnf4CfoRdRd7CNKInVREjMz4EFgubvfEeGcbeIiL+5+g7v3dPc+1P37e9ndL4laTjNrb2Yd6pepmyd+J2o53X0DsNbM+gdD46i7tkOkcjbwNf41JVOfJ4o5Wy7sSX/gTOqO+FgNTAs5y+PAeqCaup/UE4HO1L3Z9n7wtbjB+tOC3CuAM1op4ynU/Tr4d+Ct4HZmBHMeBywJcr4D/FcwHqmc+2Qew7/eUI1UTurmspcGt2X1/1eiljPY7vHA4uDv/mmgKKI584EtQMcGY5HLeag3fUJVRCSGwp6WERGRDFC5i4jEkMpdRCSGVO4iIjGkchcRiSGVu4hIDKncRURiSOUuIhJD/w9U4+5xjrcEOgAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(img_seg.mask['caudal_fin'])" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "cb94b95f", + "metadata": {}, + "outputs": [], + "source": [ + "_,_,_,_,center_caudal,new_mask_caudal= img_seg.landmark_generic('caudal_fin')\n", + "\n", + "row_caudal = round(center_caudal[0])\n", + "head_horil_line = new_mask_caudal[row_caudal, :]\n", + "#head_length = np.count_nonzero( cleaned_mask[:,col_eye]== 1)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "id": "ed0dc8c6", + "metadata": {}, + "outputs": [], + "source": [ + "def landmark_5_7(img_seg):\n", + " '''\n", + " locate the landmark 5 and 7 of the caudal fin. \n", + " We split the caudal fin upper and lower part (horizontal line through the middle).\n", + " Then, in each case get the mot left point in the half of the caudal fin\n", + " '''\n", + " _,_,_,_,center_caudal,new_mask_caudal= img_seg.landmark_generic('caudal_fin')\n", + " mask_caudal_5 = new_mask_caudal.copy()\n", + " mask_caudal_7 = new_mask_caudal.copy()\n", + " row_caudal = round(center_caudal[0])\n", + "\n", + " mask_caudal_5[row_caudal:,:] = 0\n", + " mask_caudal_7[:row_caudal,:] = 0\n", + " \n", + " lm_5_7=[]\n", + " for temp_mask in [mask_caudal_5,mask_caudal_7]: \n", + " x,y = np.where(temp_mask)\n", + " y_front = y.min()\n", + " x_front = round(np.mean(np.where(temp_mask[:, y_front,])))\n", + " lm_5_7.append((int(x_front),int(y_front)))\n", + " return lm_5_7[0], lm_5_7[1]" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "04909223", + "metadata": {}, + "outputs": [], + "source": [ + "lm_5, lm_7 = landmark_5_7(img_seg)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "f519df18", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAATkUlEQVR4nO3d4W7juBWAUVaYh+1DBIvBwA9R9FkLoz+UcZzEdmSZIu8lz8H+6W4mkR3V/OaKlksBAAAAAAAAAAAAAIAg/tX7AIBZnB/+16XRUQC0ILCAmh5X1GMaCxiGwAL2eyWnbtJYwBgEFrBV9Zy6SWMBA/jV+wCA0NpEFcBgTLBgdgETyhALyE5gwUQCttQ9GgtITWDBsBLl1E0aC8hLYMFQskfVPlIMiEZgQXpzRtVG2gvoQmBBMnKqIvkFHERgQQKiqg29BdQisCA0adWF0gJeJLAgLnXVndIC9hFYEI6uikxyAVsILAhB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7m2BIaiW4RWxqy4E1mSeyqwmgVU0FmPTVczruBUkdFqtBNZ8tjfW6VRKadNYRWYxGF0F7+ouIgnSaiWwZrUxszQWPEtawQ9+XFPSVNQDAmt6j0vr71LRrLGKzCIvaQX8NUIk8pJtS8LS8FTxiTrkczqpK+CaCRZXvk+zPq8Z5ljwTk4BDwksntAysFYyi1h0FbCNwOIJ7QNrJbPoTFcBTxJYPKdXYxWZRXu6CthLYPGcjoG1klkcTlcBLxNYPK17YxWZxRF0FVCPwGKPCI21Ulq8SlcBBxBY7BEnsFYyiz2kFXAYgcVO0RprpbT4gagCmhBY7BQzsC6UFl9JK6AhgcV+wRuryCxEFdCJwGK/+IG1klkDUk5AbAKLl2RprCKz4tNMwEAEFq/SWDzhz58Dv/myHPjNAZ4hsHhVosAqGquB06mcA5wSYgvoSmBRgcaaVJCWukdjAf0ILOpI1FhTBNaX/UzfM+jH+IhcTttpLKATgUU1WRprtMA6dFdTdgIL6ORX7wNgHEtZsjRWeqIKIDaBRU0a63DSCiADgUVlGuso0upZrg8C/Qgs6lvKUvJsyQpNVO2mroCuBBZHMcp6lbraQVcBMQgsDqSx9lNXGykqICSBxbE01h7q6jFRBYQnsDicxmI/LQXkJLBoQWPxiWwCRiewaMRbC+clp4D5CCyaWjOrKK0HxtiAJaqAufksQjprXFrvhff21vKHbnX5hOZcH7SspQC+EVgE0iC2LiO0cI11qatrLUtLJwHUI7CI6KDS+qiriwiZdTOtHnscXlIJoDeBRVzVM+tGYH3XJrl2RBUAeQgsMnk2uTYVFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvf0f0gAfwXBLQAYAAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_arr = img_seg.img_arr\n", + "def visualize_landmark(img_arr,coord):\n", + " text = '5' \n", + " \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", + " 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", + " \n", + " return img\n", + " \n", + "visualize_landmark(img_arr,lm_7)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python (Morphology_env)", + "language": "python", + "name": "snakemake" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Scripts/Morphology_dev.ipynb b/Scripts/Morphology_dev.ipynb index bf342e3..87e6a5a 100644 --- a/Scripts/Morphology_dev.ipynb +++ b/Scripts/Morphology_dev.ipynb @@ -7,28 +7,31 @@ "source": [ "# Development for morphology trait extraction\n", "\n", - "This notebook gives example and a platform to develop and visualize extraction on morphological traits\n", - "The function framework is based on a class \"Traits_class\" define in the same folder.\n", - "if you modify the \"Traits_class\" reload the module by running the first cell to see the modification appear in the notebook.\n", + "This notebook gives examples and a platform to develop and visualize extraction on morphological traits\n", + "The functions used are define in a class \"Traits_class\" that you can find in the same folder (Morphology-analysis/Scripts/Traits_class.py).\n", + "If you want modify the \"Traits_class.py\" reload the module by running the first cell to see the modification appear in the notebook.\n", "\n", "**Study case:**\n", + "To illustrate the morphology workflow and functionality, we are using the 2 images :\n", "\n", - "\n" + " + Morphology-analysis/Test_Data/INHS_FISH_000742_segmented.png\n", + " + Morphology-analysis/Test_Data/INHS_FISH_18609_segmented.png\n", + " " ] }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 35, "id": "602dc370", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 43, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -40,25 +43,27 @@ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from PIL import Image, ImageDraw, ImageFont\n", + "from IPython.display import Image\n", "import importlib\n", + "import skimage as ski\n", "importlib.reload(tc)" ] }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 2, "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_images/INHS_FISH_000742_segmented.png'\n", - "metadata_file = 'test_images/INHS_FISH_000742.json'" + "segmented_file = '../Test_Data/INHS_FISH_000742_segmented.png'\n", + "metadata_file = '../Test_Data/INHS_FISH_000742.json'" ] }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 3, "id": "2289de98", "metadata": {}, "outputs": [], @@ -66,7 +71,7 @@ "# Create the object segmented image create by the class during initialisation\n", "img_seg = tc.segmented_image(segmented_file)\n", "\n", - "# variable create at initialization time\n", + "# oupput the variables create at initialization time\n", "measurement = img_seg.measurement\n", "landmark = img_seg.landmark\n", "presence_matrix = img_seg.presence_matrix\n", @@ -88,7 +93,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 4, "id": "ae9eb407", "metadata": {}, "outputs": [ @@ -108,7 +113,7 @@ " 'trunk': {'number': 2, 'percentage': 0.992120507069956}}" ] }, - "execution_count": 21, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -120,7 +125,37 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 5, + "id": "b24d03d1", + "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": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# measurement dictionnary\n", + "measurement" + ] + }, + { + "cell_type": "code", + "execution_count": 6, "id": "ffda5440", "metadata": {}, "outputs": [ @@ -141,13 +176,10 @@ " '12': (162, 187),\n", " '13': (224, 138),\n", " '14': (136, 66),\n", - " '15': (134, 96),\n", - " '16': (115, 81),\n", - " '17': (153, 81),\n", - " '18': (135, 81)}" + " '15': (134, 96)}" ] }, - "execution_count": 45, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -159,73 +191,707 @@ }, { "cell_type": "code", - "execution_count": 29, - "id": "60024ce2", + "execution_count": 7, + "id": "8b7d1b1a", "metadata": {}, "outputs": [ { - "ename": "SyntaxError", - "evalue": "invalid syntax (1558273965.py, line 1)", - "output_type": "error", - "traceback": [ - "\u001b[0;36m Input \u001b[0;32mIn [29]\u001b[0;36m\u001b[0m\n\u001b[0;31m list_order = [1:19]\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAY90lEQVR4nO3dbW6jyrqA0Tooo7gjPIOILGR5EFt7gGcUkXV/4KYJxhgwUF9rqdXqdBzHSbvtJ28VOAQAAAAAAAAAAAAAAEjEf2LfAKAW99n3NifdCoAzCCxgT/MVNU9jAcUQWMB2n+TUJI0FlEFgAUvtnlOTNBZQgK/YNwBI2jlRBVAYEyyoXYIJZYgF5E5gQUUSbKlXNBaQNYEFMbVtO/PmhzLKqUkaC8iXwII4Zlrqk8zKPaq2kWJAagQWnG1hPy3PrDqjaiHtBUQhsOBUq6ZTkxeWUzuSX8BBnKYBMiCqDjL6xuotYC8mWHCefiL1/IdXLrtue2chpQV8yMMInK2LquHvpOb+5xfANiZYcJLnllrYWIZYSfF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+//j+2Pz8TF5JWADkQWOxMY20wSqvhX/7NLGm1lvVBIB6Bxf6a0IR8tmTFNZlWzxdoL2XtGzuBugKi8hjEURr3rnfe1tXfSxpfLdQ0j18AUZlgcSDLhRxOSwFJcpoGDpdaYyVymobh+Kpt2/73yT883rRQ2BFVQPI8TnE4a4Uz2rYdV9QgtkbvqlG/5Df8BZA8D1WcQWON9OOr58Ca+6hidmJNZpOWAgpiDxYncWhhvXQSUB+Bxan6UZbSKpyoAurmQZA4+kWg8z/v+IWQ+ZClPYAnjiIkISeMtf4m3ff30Z9rxnAP1vhdg11ZE+897kBCVQSwH4FFig4qrYmBWbzMWn6W0b8f0vfWffb7I5UAYrMHixSdtyP+ebnwnOS63cInp2CQUABpM8EiJ2uTK/HTQ6w6zZVzYgFkxASLnCQeTADQ8XQF0aw4xajxFUBWLBFCfDP9JK0AciSwIBWTL0oIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOTj/wGZVIJ92gsmjAAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Visualize landmarks \n", + "img_landmark" + ] + }, + { + "cell_type": "markdown", + "id": "100fd501", + "metadata": {}, + "source": [ + "## 3- Explore 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", + " 2. Import the image and Masks extraction\n", + " 3. Clean the mask\n", + " 4.\n", + " 5. " + ] + }, + { + "cell_type": "markdown", + "id": "493c71c2", + "metadata": {}, + "source": [ + "### 1- Masks extraction \n", + "\n", + " + Import the image : \n", + " + Function to convert the image.png in to a disctionnary with key = trait ('trunk', 'dorsal_fin'...)\n", + " masks = img_seg.mask\n", + " + Visualize the mask\n", + " \n" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "f9ce0bf1", + "metadata": {}, + "outputs": [ + { + "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" ] } ], "source": [ - "list_order = [1:19]" + "# Convert the image.png the dictionnary of mask\n", + "# 1- use the variable \"mask\" which is created by the function \"img_seg.get_channels_mask()\"\n", + "masks_dict = img_seg.mask\n", + "\n", + "print(\"This is the list of the trait :\",list(masks_dict.keys()))" ] }, { "cell_type": "code", - "execution_count": 46, - "id": "8b7d1b1a", + "execution_count": 17, + "id": "fccc32b4", "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAZo0lEQVR4nO3dbW6bXBqA4TOoq5gVziIiC1lexGgW+K4isuYHKSGACWDgfF2XqqpJ7ISmrn3nOcc4BAAAAAAAAAAAAAAASMS/Yh8AUIvn4kebi44C4AoCCzjSckUt01hAMQQWsN87OTVLYwFlEFjAWofn1CyNBRTgT+wDAJJ2TVQBFMYEC2qXYEIZYgG5E1hQkQRb6hWNBWRNYEFMbdsuvPmmjHJqlsYC8iWwII6Flnons3KPqn2kGJAagQVXW9lP6zOrzqhaSXsBUQgsuNSm6dTsheXUgeQXcBKnaYAMiKqTjL6xegs4igkWXKefSE3/8Mrt0G3vrKS0gDe5G4GrdVE1/J3UPP/+AtjHBAsuMm2plY1liJUUP5UCa9iDBRGsXyIkNcOxltgCXnH/ABG0bWuJsACWEYFXTLDgatKqMH1j+YEV6NmDBW/7+FhzqfbP988zm5YI28/P5+Ox58CIR2xB5QQWrLAuoX41bKy1V/n8HL1HbGVHbEGFLBHCxEE5dZJm8fDkV4KsIUKFTLDg0qLaNMSajq/2UV0JEltQNhMsqpH2XOp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Y72j/fPj/2P7+TlzIWkFkAOBxcE01g6jtBq+8zuzpNVW1geBeAQWx2tCE/LZkhXXbFpNL9Deyto3dgF1BUTlPoizNG5dv/m1rr4vaXy1UtN8/QKIygSLE1ku5HRaCkiS0zRwutQaK5HTNAzHV23b9r/P/uHrTQuFHVEFJM/9FKezVrigbdtxRQ1ia/ShGvVLfsNfAMlzV8UVNNZIP76aBtbStYrZiTWbTVoKKIg9WFzEUwvrpZOA+ggsLtWPspRW4UQVUDd3gsTRLwJd/3XHL4TMmyztAUx4FiEJuWCs9Z10Hx9nf60Fwz1Y4w8NdmXNfPS8JxKqIoDjCCxSdFJpzQzM4mXW+rOMfl+l763n4vdHKgHEZg8WKbpuR/x0ufCa5Ho8wjunYJBQAGkzwSInW5Mr8dNDbDrNlXNiAWTEBIucJB5MANDxcAXRbDjFqPEVQFYsEUJ8C/0krQByJLAgFbMvSggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OP/SIFCPeO9YoQAAAAASUVORK5CYII=\n", "text/plain": [ - "" + "" ] }, - "execution_count": 46, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUFklEQVR4nO3dfXRU9Z3H8fd3ZkICieFBBQMJAp6IAhVE5EF3WytSkW2F1q3iI1q7VMWqtbsW2q2ntmuP1dbSs2qVaguWVhYfWtBaRWk9bUVUVFQeDM+V8KjIMxJI8t0/cjlNJZBJMpN75+bzOidn7vzmztxPePjk5jd37jV3R0RE4iURdgAREck8lbuISAyp3EVEYkjlLiISQyp3EZEYUrmLiMRQ1srdzEabWYWZrT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w/9X4lazmC7g4BFwd/974HOEc3ZAdgGdKw3Frmczf3SJ1RFRGIo7GkZERHJApW7iEgMqdxFRGJI5S4iEkMqdxGRGFK5i4jEkMpdRCSGVO4iIjH0/1xedi1qt9iKAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" } ], "source": [ - "# Visualize landmarks \n", - "img_landmark" + "# Visualize the mask for a specific trait\n", + "trait_name = 'head'\n", + "plt.imshow(masks_dict[trait_name])" + ] + }, + { + "cell_type": "markdown", + "id": "486170f3", + "metadata": {}, + "source": [ + "### 2- Clean the mask and presence matrix\n", + "\n", + "Clean the mask involve:\n", + " + Assessing the number of blob and decide what we keep and what we discard\n", + " + Filling up hole in the blob\n", + " + Create the presence matrix with Number of blob and the percentage of the biggest\n", + " \n", + "We will use the module skimage.measure.regionprops to manipulate the mask, find the individual blobs and access properties of the \"region\" (blob) such as centroid, area, bbox... (reference : https://scikit-image.org/docs/dev/api/skimage.measure.html)" ] }, { "cell_type": "code", "execution_count": null, + "id": "b65c0131", + "metadata": {}, + "outputs": [], + "source": [ + "# Example of problem, the head trait mask as hole inisde correspond to the eye.\n", + "# we want the whole head especially if we want to calculate area\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "b92fee15", + "metadata": {}, + "outputs": [], + "source": [ + "# Create a regionprop that has been cleaned\n", + "# Remove hole \n", + "# Keep only the big blob\n", + "# regionprop_object has mutiple properties\n", + "regionprop_head = img_seg.clean_trait_region(masks_dict['head'])" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "be28ead1", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area : 16034\n", + "centroid : (148.13259323936634, 119.70369215417239)\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8C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xrYsx/peNAd6zU6E1Ff3+s4BRIpIsIs2BVsASC/VF3Kk/hn5X4vucQADrxOotvcaYUhG5B5gLuIGpxph1NmuyJAt4V0TA93/yhjFmjogsBWaIyFhgF3CtxRrDSkTeBAYAmSKyG3gceJpyfn9jzDoRmQGsx9c056fGmOhrlnceFayTASLSBd8u/Q7gDghsnegVfkrFKdu7/UopSzT8SsUpDb9ScUrDr1Sc0vArFac0/ErFKQ2/UnFKw69UnPp/p9FEZdFiSVEAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# Explore Regionprop_object properties\n", + "# full list of properties is here https://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.regionprops\n", + "print(\"area :\", regionprop_head.area)\n", + "print(\"centroid :\", regionprop_head.centroid)\n", + "# display the image of the new mask correponding to the clean trait mask\n", + "plt.imshow(regionprop_head.image)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, "id": "f5eea310", "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACKCAYAAABRuwqNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAOe0lEQVR4nO3de3CV9Z3H8fc3MQESLga5NAu0RKHUy2zRMqjFui5oC2grbbcV29qMYxd3BVfEdQeG6bo7W2fcdRZ3xql2rdqiVVlXpbKOlSKy22mpXAVKDBEENFlCAspyCZfknHz3j/OkHsjJ/Zw8T558XjNnznN+58l5PlzyycnvPOf8zN0REZF4yQs7gIiIZJ/KXUQkhlTuIiIxpHIXEYkhlbuISAyp3EVEYihn5W5mM82sysz2mNniXB1HRERas1yc525m+cB7wA1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lAfb5aTmuFvG55rZADMrAyYCG3MdxswMeAqodPdlEc450szOD7YHAdcDu6KW092XuPtYdx9P6v/fW+7+vajlNLNiMxvSsk1qnnhn1HK6+0Gg2swmBUMzgHejljPNrXwyJdOSJ4o5uy7sSX9gNqkzPt4Hloac5QWgFmgi9ZP6DuACUi+27Q6uh6ftvzTIXQXM6qWM15D6dXAHsC24zI5gzj8F3gly7gT+PhiPVM5zMl/HJy+oRionqbns7cGlouV7JWo5g+NOBjYH//a/BEoimrMI+AgYljYWuZzdvegdqiIiMRT2tIyIiOSAyl1EJIZU7iIiMaRyFxGJIZW7iEgMqdxFRGJI5S4iEkMqdxGRGPp/FDdh7KZwHJoAAAAASUVORK5CYII=\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_18609_segmented.png'\n", + "img_seg_2 = tc.segmented_image(segmented_file)\n", + "masks_dict_2 = img_seg_2.mask\n", + "plt.imshow(masks_dict_2['pelvic_fin'])\n" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "6bb2a90a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAADhCAYAAADRVO5tAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAOk0lEQVR4nO3df6zdd13H8eeLWlo2RFrYlrJOB0lBCIEOb8ZwxsyVaZlk85+ZzWD6x5L+g3EoCes0McGEZCaG4B/GpBGkEQQnP9yyEEctLEZDgAJldJStkx+jrK4wQKYkSwdv/zjfytnZ/XHur/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wer6mNDyXVOVf2Q0XXf9/ac62rghoz+p6gPA9cm+UDPmYDVXfhtHZ0CTnX/cgL4CKOC3neuc94EfLGqHu/2+8z1RuAbVfXdqjoLfAz41Z4zLWiWBfzzwK4kL+3+xr0ZuGeGr7+Ue4B93f19jGbQM5MkwHuBE1X17gHluijJC7v7z2P0Df61PnNV1R1VtbOqLmf0ffSpqnpLn5lgdOG3JD9/7j6j2enxvnNV1X8B307yiu7QHuCrfecacws/G59Av7keBa5KckH3M7mH0S98h/JePdMsB+7A9cDDwH8Cf9rX4J/RN8tp4Cyj7uRW4EWMfil2sttun3GmX2M0UnoAONbdrh9ArtcAX+pyHQf+rDvea66xfNfws19i9v1evQz4cnd78Nz3eN+5ugy7gaPd1/GfgW0DyXUB8ATwC2PH+v46vpNRk3Ic+HtgS9+ZFrp5JqYkNcozMSWpURZwSWqUBVySGmUBl6RGWcAlqVEWcElqlAVckhplAZekRv0f1OlppFqvNtEAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# During the clean step we remove the small blod and keep only the big one\n", + "regionprop_pelvic = img_seg.clean_trait_region(masks_dict_2['pelvic_fin'])\n", + "plt.imshow(regionprop_pelvic.image)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "03bf6f15", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'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}}\n" + ] + } + ], + "source": [ + "# The presence matrix is created using the following function\n", + "presence = img_seg_2.get_presence_matrix()\n", + "# or directly access the variable\n", + "presence = img_seg_2.presence_matrix\n", + "print(presence)" + ] + }, + { + "cell_type": "markdown", + "id": "4f2d1e48", + "metadata": {}, + "source": [ + "### 3- Collect properties and landmark\n", + "\n", + "In this section there are multiple small functions to calculate and extract what we want from the mask, using either direct calculation on the mask or using the regionprop_object. You can explore the class on the repo, there are plenty of small functions with some redundancy (with different way calculate the same value) and some that are not necessarly used and function in jupyter notebook (particular visualisation functions)\n", + "\n", + "List of funtion: \n", + "\n", + " + img_seg.landmark_generic(trait_name) : return the most front_point , back_point, top_point, bottom_point, centroid, new_mask\n", + " + img_seg.landmark_5_7 : calculate specifically the landmark 5 7\n", + " + img_seg.all_landmark() : combine all the landmark in a dictionnary\n", + " + img_seg.visualize_landmark() : plot landmark on the original segmentation\n", + " \n", + "Now play" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "b64417f6", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "most front point: (148, 36)\n", + "most back point: (162, 187)\n" + ] + } + ], + "source": [ + "front_lm, back_lm, top_lm, bottom_lm, centroid, new_mask = img_seg.landmark_generic('head')\n", + "print(\"most front point:\", front_lm)\n", + "print(\"most back point:\", back_lm)" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "8208aa2c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'1': (148, 36),\n", + " '2': (66, 148),\n", + " '3': (21, 301),\n", + " '4': (106, 566),\n", + " '5': (112, 606),\n", + " '6': (150, 622),\n", + " '7': (203, 592),\n", + " '8': (200, 562),\n", + " '9': (242, 478),\n", + " '10': (279, 305),\n", + " '11': (217, 169),\n", + " '12': (162, 187),\n", + " '13': (224, 138),\n", + " '14': (136, 66),\n", + " '15': (134, 96)}" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# landmark dictionnary\n", + "img_seg.all_landmark()" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "99b54f95", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAE7CAIAAACqnHJOAAAY90lEQVR4nO3dbW6jyrqA0Tooo7gjPIOILGR5EFt7gGcUkXV/4KYJxhgwUF9rqdXqdBzHSbvtJ28VOAQAAAAAAAAAAAAAAEjEf2LfAKAW99n3NifdCoAzCCxgT/MVNU9jAcUQWMB2n+TUJI0FlEFgAUvtnlOTNBZQgK/YNwBI2jlRBVAYEyyoXYIJZYgF5E5gQUUSbKlXNBaQNYEFMbVtO/PmhzLKqUkaC8iXwII4Zlrqk8zKPaq2kWJAagQWnG1hPy3PrDqjaiHtBUQhsOBUq6ZTkxeWUzuSX8BBnKYBMiCqDjL6xuotYC8mWHCefiL1/IdXLrtue2chpQV8yMMInK2LquHvpOb+5xfANiZYcJLnllrYWIZYSfFTKbCEPVgQwfIlQlIzHGuJLeAVjw8QQdu2lggLYBkReMUEC84mrQrTN5YfWIGePVjwse/vJZdqv/7+PLNqibD9+bnfbltuGPGILaicwIIFliXUW8PGWvohPz+jvxFb2RFbUCFLhPBkp5w6SDN78+RXgqwhQoVMsODUolo1xHoeX22juhIktqBsJlhUI+251KEmh16qKy5jLSibCRYlSrulFg6x9hpfLXW7OeNALBoLyiOwKEXaUfVsJrPOTqsp5lsn01hQGIFFhnJrqRmjzEohrSbprXPILCiGwCJtBbVUSfTWcTQWlEFgkQYhlTnJtTulBVkTWMQjqkqktPYlsyBTAotziapqKK0dySzIjsDieKKqemLrcxoL8iKwOJK04jel9SGZBbkQWBxAV/GW85pupbEgCwKLnYgqNhNb68ksSJzA4jO6ir3IrPVkFiRLYLGVtOIIt1sYvBAyb2ksSJPAYj1pxTnMtBaTWZAagcUa0ooolNYyMgvSIbBYRlqRAqW1gMyCFAgs3pFWJEhpzdJYEJ3A4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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOTj/wGZVIJ92gsmjAAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Visualize the landmark\n", + "img_seg.visualize_landmark()" + ] + }, + { + "cell_type": "markdown", + "id": "bd018bc8", + "metadata": {}, + "source": [ + "### 3- Measurement part\n", + "\n", + "Functions to calculate what we need to measure what we want!!!\n", + "\n", + " + img_seg.get_distance(a,b) : measure distance between two point\n", + " + img_seg.measure_eye_area()\n", + " + img_seg.measure_head_area()\n", + " + img_seg.measure_eye_head_ratio()\n", + " + img_seg.calculate_triangle_area(point_1, Poit_2, point_3)\n", + " + img_seg.measure_eye_diameter()\n", + " + img_seg.all_measure() create the following dictionnary using the previous fucntions:\n", + " + measure['SL'] = self.get_distance(landmark['1'],landmark['6'])\n", + " + measure['EA'] = self.measure_eye_area()\n", + " + measure['HAt'] = self.calculate_triangle_area(landmark['1'],landmark['2'],landmark['13'])\n", + " + measure['HAp'] = self.measure_head_area()\n", + " + measure['HCL'] = \"WIP\"\n", + " + measure['ED'] = self.measure_eye_diameter()\n", + " + measure['HL'] = self.get_distance(landmark['1'],landmark['12'])\n", + " + measure['HD'] = self.get_distance(landmark['2'],landmark['13'])\n", + " + measure['pOD'] = self.get_distance(landmark['1'],landmark['14'])\n", + "\n", + "Now play!" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "f4bf0c4f", + "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": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_seg.all_measure()" + ] + }, + { + "cell_type": "markdown", + "id": "e033c2f9", + "metadata": {}, + "source": [ + "## Development Section\n", + "\n", + "This is where we make a mess!!!" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "add5f243", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "82724" + ] + }, + "execution_count": 25, + "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+YZbu1HOvvq1X9GV7h7L3JY0CrDxnrLcBHaSTfvoDP89uvldZu7d34mbO9ygikej0uXtrlnOuV0XHwtJzd86VmtmNwG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I5Vwy8TtkerHHDOfcNsO/WRYOBiaH3E4H/KVf+unOuyDm3Eti9P23Mcc7lOOd+DL3fCezeu1dtUyYv9DEx9ONQ22BmLYFBwLhyxXHZLl4n9xbAmnKfK9xvNQ41d2UbkxN6bRYqj8v22mfvXrUNe4Ye5gCbgMnOObVNmZHAX9h7tYy4bBevk3u19luVPeKuvSrYu/eAVSsoi9m2cWVbXPagbBvL3mZ2TCXV46JtzOx3wCbn3KzqnlJBWcy0i9fJXfutVmzj7m0MQ6+bQuVx1V4V7d2L2mYvzrltwBRgIGqbk4BzzCybsiHe08zsZeK0XbxO7j8AHcysrZnVAy6kbA/WePc+MCz0fhjwXrnyuNif9kB796K2wcyamtnhoff1gTOAxcR52zjn7nLOtXTOtaEsl3zpnBtCvLaL13d0gd9SNhNiOfBXr+Px4Pd/DcgBSijrSVwJNAa+AJaFXtPL1f9rqK2WAL/xOv4wtsvJlP2J/BMwJ/TzW7WNA+gOzA61zXzg76HyuG+bcr/vAH6ZLROX7aInVEVEYpDXwzIiIhIGSu4iIjFIyV1EJAYpuYuIxCAldxGRGKTkLiISg5TcRURikJK7iEgM+v94zGEOtozB3AAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "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", + "np.all(pad_mask == erosion_trunk)\n", + "sum(sum(pad_mask))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "982c2856", + "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 30, + "id": "d452f502", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(264, 474)\n", + "(262, 472)\n", + "1277.9453095790602\n", + "1277.9453095790602\n" + ] + } + ], + "source": [ + "print(pad_mask.shape)\n", + "print( trunk_mask.shape)\n", + "print(ski.measure.perimeter(trunk_mask))\n", + "print(ski.measure.perimeter(pad_mask))" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "5d3ae5d3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4\n", + "1427\n", + "(1495, 2)\n", + "1128\n", + "125136\n" + ] + } + ], + "source": [ + "contour_1 = ski.measure.find_contours(trunk_mask)\n", + "print(len(contour_1))\n", + "print(sum([a.shape[0] for a in contour_1]))\n", + "\n", + "contour_2 = ski.measure.find_contours(pad_mask)[0]\n", + "print(contour_2.shape)\n", + "\n", + "contour_ = np.logical_and(pad_mask, np.logical_not(erosion_trunk))\n", + "print(sum(sum(contour_)))\n", + "contour_3 = ski.measure.find_contours(contour_)[0]\n", + "print(sum([a.shape[0] for a in contour_]))" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "id": "ee1e920f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[array([[262.5, 145. ],\n", + " [262.5, 144. ],\n", + " [262.5, 143. ],\n", + " ...,\n", + " [261.5, 146. ],\n", + " [262. , 145.5],\n", + " [262.5, 145. ]])]" + ] + }, + "execution_count": 70, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAADdCAYAAABAMDLCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAooElEQVR4nO3deXhdVbn48e97hpyTpEmapJmTJmmbNG0RWiilBQdGBURBH+FWfyoIV8SrV1EEQcABRFFkUK+gVbiCIsgVB0BECloc2tKJFtqmmZo0c9Kmm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W4JtVSYi77Mn6pknInki8ncRKRWRPSLyxWC5to2IV0S2iMiuYNt8K1ge9W0DICJOEXlNRJ4Lfo7OdjHG2PYDOIEqYAEQA+wCltoZkw1t8G7gVGD3iLLvAzcH398MfC/4fmmwjTxAYbDtnHb/DjPULlnAqcH3CUB58PfXtgks5Dcn+N5NYGe01do2b7bPl4HfAM8FP0dlu9jdc18FVBpj9htjhoAnCezBGjWMMf8A3r510aXAo8H3jwKXjSh/0hgzaIypBo7sTxtxjDFNxpgdwffdwJG9e7VtAnqCH93BH4O2DSKSC7wf+MWI4qhsF7uTew5QN+LzqPutRqEME9iYnOBrerA8KtvrbXv3atvw5tDDTqAVWG+M0bYJeAC4iaNXy4jKdrE7uU9ov1X1pqhrr1H27h2z6ihlEds2JrDF5XIC21iuEpGTjlM9KtpGRC4BWo0x2yd6yihlEdMudid33W91dC1HtjEMvrYGy6OqvUbbuxdtm6MYYzqADcCFaNucBXxQRGoIDPGeKyK/Jkrbxe7kvhUoEpFCEYkB1hLYgzXaPQNcGXx/JfCnEeVRsT/tWHv3om2DiKSJyNzg+1jgfGAfUd42xphbjDG5xpgCArnkb8aYjxOt7WL3HV3gYgIzIaqAW+2Ox4bf/wmgCRgm0JO4BkgFXgYqgq8pI+rfGmyrMuAiu+OfwXZ5J4E/kV8HdgZ/Lta2MQAnA68F22Y38PVgedS3zYjf92zemi0Tle2iT6gqpVQEsntYRiml1AzQ5K6UUhFIk7tSSkUgTe5KKRWBNLkrpVQE0uSulFIRSJO7UkpFIE3uSikVgf4/w2y4BiGfKVsAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "contour_ = np.logical_and(pad_mask, np.logical_not(erosion_trunk))\n", + "plt.imshow(contour_)\n", + "list_contour = ski.measure.find_contours(contour_)\n", + "list_contour_2 = ski.measure.find_contours(pad_mask)\n", + "list_contour_2\n" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "id": "f5abdcdd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1495, 2)" + ] + }, + "execution_count": 88, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a =list_contour_2[0]\n", + "a.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "id": "a7e0885b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1280.7737367037953" + ] + }, + "execution_count": 93, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "distance = lambda a,b: ((a[0] - b[0])**2 + (a[1] - b[1])**2)**0.5\n", + "distance(list_contour_2[0][0,:],list_contour_2[0][1,:])\n", + "a =list_contour_2[0]\n", + "list_segment = [distance(a[i,:],a[i+1,:]) for i in range(a.shape[0]-1)]\n", + "sum(list_segment)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "84e350d9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAADcCAYAAACLbOFnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAjRklEQVR4nO3dd3xUVd7H8c9vJiEhRKoUKdKLoC4CAtaH1bWsDXdtuKxiAxV1RX3s7uPqa3XXvjZcUVx1dXWxIepaEGUVqUFAhVBCUYKhKEFJQpIp5/kjAwZJI5nJnfJ9v155zcyZO/f+OMo3l3PvnGPOOUREJLn4vC5ARESiT+EuIpKEFO4iIklI4S4ikoQU7iIiSUjhLiKShGIW7mZ2opmtMLM8M7spVscREZE9WSzuczczP7ASOA7IBxYA5zrnlkX9YCIisodYnbkPBfKcc2ucc+XAy8DIGB1LRER+Ji1G++0ErK/0Oh8YVnkDMxsHjAPw4x+cRfMYlSI7md9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V1C/VS4m+iZsxdxERiZ54OnMXEZEoUbiLiCQhz8PdzE40sxVmlmdmN3ldT2Mzs2fMbLOZfVWprbWZTTezVZHHVpXeuznSVyvM7ARvqm4cZtbFzD42s1wzW2pmV0faU75/zCzTzOab2ZJI39wRaU/5vgEwM7+ZLTKztyOvU69fnHOe/QB+YDXQA2gCLAH6e1mTB31wNDAI+KpS273ATZHnNwH3RJ73j/RRBtA90nd+r/8MMeyb/YBBkef7ACsjfZDy/UPFugnZkefpVCygM1x9s6t/rgX+BbwdeZ1y/eL1mftQIM85t8Y5Vw68TMUyfSnDOfcJsPVnzSOB5yLPnwNOr9T+snOuzDm3Fti5hGFScs4VOOc+jzzfDuxc4jHl+8dVKIq8TI/8ONQ3mFln4GTg6UrNKdcvXod7J2B9pddVLsmXgtq7irVriTy2i7SnbH/9bIlH9Q+7hh4WA5uB6c459U2FvwE3AOFKbSnXL16He52W5JNdUrK/qljisdpNq2hL2v5xFSuhDaRitbOhZnZgDZunRN+Y2SnAZufcwrp+pIq2pOgXr8NdS/JVbdPOla4ij5sj7SnXX1Ut8Yj6ZzfOuW3ATOBE1DdHAKeZ2ToqhnmPMbMXSMF+8TrcFwC9zay7mTUBRlGxTF+qmwaMiTwfA7xZqT1lljCsbolH1D+YWVszaxl53hT4FbCcFO8b59zNzrnOzrluVOTJR86535OK/eL1FV3gJCruglgN3Op1PR78+V8CCoAAFWcRFwNtgBnAqshj60rb3xrpqxXAr72uP8Z9cyQV/0T+Algc+TlJ/eMADgYWRfrmK+D/Iu0p3zeV/rwj+OlumZTrF00/ICKShLwelhERkRhQuIuIJCGFu4hIElK4i4gkIYW7iEgSUriLiCQhhbuISBL6fwONMOKw0iCYAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "plt.imshow(trunk_pro.image)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, "id": "6ee0446b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 18, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" }, { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACnCAYAAADqiRxlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAU0UlEQVR4nO3deXhU9b3H8fd3JhshBBI2MSBgDCBwRZQCiqVc0IrWq17qVmtr+2BxgdbtaYsPelvb5/ZRW21t3YpLS90oole81qtV1Pq0bKJIFREEsRLZAiJhkZBMvvePnLQBAklgJufk+Hk9zzw585szcz5h+eTkN2fOMXdHRETiJRF2ABERST+Vu4hIDKncRURiSOUuIhJDKncRkRhSuYuIxFDGyt3MxpvZCjNbZWZTM7UdERHZn2XiOHczSwIrgdOAcuB14Gvu/m7aNyYiIvvJ1J77cGCVu3/g7nuAmcA5GdqWiIjsI1PlXgKsbXC/PBgTEZFWkJWh17VGxvaa/zGzScAkgCTJE/MpzFAUEZF42s7Wze7etbHHMlXu5UCvBvd7AusaruDu04HpAIVW7CNsXIaiiIjE00s++x8HeixT0zKvA2Vm1tfMcoCLgGcytC0REdlHRvbc3b3GzKYALwBJ4CF3X5aJbYmIyP4yNS2Duz8HPJep1xcRkQPTJ1RFRGJI5S4iEkMqdxGRGFK5i4jEkMpdRCSGVO4iIjGkchcRiSGVu4hIDKncRURiSOUuIhJDKncRkRhSuYuIxJDKXUQkhlTuIiIxpHIXEYkhlbuISAyp3EVEYkjlLiISQyp3EZEYUrmLiMSQyl1EJIZU7iIiMaRyFxGJIZW7iEgMqdxFRGJI5S4iEkNZYQcQEWnrkl06U9O/FzuPzGX9WdWwLZvSJ/aQ3F0DS5bjNTWtnknlLiLSlESSRPv8uuW+JVR8oQiATwc6w0euYHCHcq4p/j+SZuRaNgC7JuxhW+0eblw3nldXlVH0Sh5WC91eLif18fqM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SG7iAmq1i2+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": [ "
" ] @@ -237,7 +903,7 @@ } ], "source": [ - "caudal_fin = img_seg.mask['caudal_fin']\n", + "caudal_fin = img_seg.mask['trunk']\n", "\n", "plt.imshow(caudal_fin)" ] @@ -371,14 +1037,6 @@ " \n", "visualize_landmark(img_arr,lm_7)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fadc18fa", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/Scripts/Morphology_main.py b/Scripts/Morphology_main.py index 5bd9f1b..0fe0a8d 100755 --- a/Scripts/Morphology_main.py +++ b/Scripts/Morphology_main.py @@ -7,6 +7,7 @@ """ import Traits_class as tc import json, sys +import numpy as np def get_scale(metadata_file): @@ -27,6 +28,18 @@ def get_scale(metadata_file): unit =[None] return scale , unit +# 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): + def default(self, obj): + if isinstance(obj, np.integer): + return int(obj) + if isinstance(obj, np.floating): + print(obj) + return float(obj) + if isinstance(obj, np.ndarray): + return obj.tolist() + return json.JSONEncoder.default(self, obj) def main(input_file, metadata_file, output_measure, output_landmark, output_presence, output_lm_image=None): @@ -43,8 +56,9 @@ def main(input_file, metadata_file, output_measure, output_landmark, output_pres measurement['unit'] = unit # 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: - json.dump(measurement, f) + json.dump(measurement, f, cls=NpEncoder) with open(output_landmark, 'w') as f: json.dump(landmark, f) diff --git a/Scripts/Traits_class.py b/Scripts/Traits_class.py index d5814b5..7423840 100644 --- a/Scripts/Traits_class.py +++ b/Scripts/Traits_class.py @@ -362,13 +362,33 @@ def all_landmark(self): # reorder the key new_landmark={} - list_order = [str(i) for i in range(1,19)] + list_order = [str(i) for i in range(1,16)] for key in list_order: new_landmark[key] = landmark[key] return new_landmark + def measure_eye_area(self): + ''' + Calculate eye area after cleaning and filing hole + + ''' + mask = self.mask + eye_region = self.clean_trait_region(mask['eye']) + + return eye_region.area + + def measure_head_area(self): + ''' + Calculate head area after cleaning and filing hole + + ''' + mask = self.mask + head_region = self.clean_trait_region(mask['head']) + + return head_region.area + def measure_eye_head_ratio(self): ''' Create eye head area ratio @@ -376,13 +396,13 @@ def measure_eye_head_ratio(self): 2- Area eye after cleaning and filing hole 3- ratio ''' - mask = self.mask - head_region = self.clean_trait_region(mask['head']) - eye_region = self.clean_trait_region(mask['eye']) + eye_areaa = measure_eye_area() + head_area = measure_head_area() - eye_head_ratio = eye_region.area/head_region.area + eye_head_ratio = eye_area/head_area - return eye_head_ratio + return eye_head_ratio + def measure_eye_diameter(self): ''' @@ -392,7 +412,7 @@ def measure_eye_diameter(self): mask = self.mask eye_region = self.clean_trait_region(mask['eye']) - eq_diameter = (eye_region.area/math.pi)**0.5 + eq_diameter = eye_region.equivalent_diameter_area return eq_diameter @@ -407,6 +427,19 @@ def measure_head_length(self): return head_length + def calculate_triangle_area(self, point_1, point_2, point_3): + + # calculate the semi-perimeter + a = self.get_distance(point_1, point_2) + b = self.get_distance(point_2, point_3) + c = self.get_distance(point_3, point_1) + + s = (a + b + c) / 2 + + # calculate the area + area = (s*(s-a)*(s-b)*(s-c)) ** 0.5 + return area + def measure_head_depth(self): ''' Measure vertical length of the head passing by the center of the eye @@ -433,16 +466,15 @@ def all_measure(self): landmark = self.landmark measure={} # Standard length body length - measure['A'] = self.get_distance(landmark['1'],landmark['6']) - measure['B'] = self.measure_eye_head_ratio() - measure['C'] = self.measure_eye_diameter() - measure['D'] = self.measure_head_depth() - # Head length landmark 2 to 15 - measure['E'] = self.get_distance(landmark['2'],landmark['15']) - # - measure['F'] = self.get_distance(landmark['1'],landmark['14']) - # - measure['G'] = self.get_distance(landmark['1'],landmark['6']) + measure['SL'] = self.get_distance(landmark['1'],landmark['6']) + measure['EA'] = int(self.measure_eye_area()) + measure['HAt'] = self.calculate_triangle_area(landmark['1'],landmark['2'],landmark['13']) + measure['HAp'] = self.measure_head_area() + measure['HCL'] = "WIP" + measure['ED'] = self.measure_eye_diameter() + measure['HL'] = self.get_distance(landmark['1'],landmark['12']) + measure['HD'] = self.get_distance(landmark['2'],landmark['13']) + measure['pOD'] = self.get_distance(landmark['1'],landmark['14']) return measure def visualize_landmark(self): diff --git a/Scripts/__pycache__/Traits_class.cpython-37.pyc b/Scripts/__pycache__/Traits_class.cpython-37.pyc deleted file mode 100644 index fe0aae71fcfb6f44acca4c8ba6c31c39d4bd52a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12214 zcmcIqON<-IdF~gqTHD!;ce2TD?4+YL-DEXq zdWK|E)jgUa%>j~q#A_gX$m@{A0Y(TAB)1%L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