{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# [Angle closure Glaucoma Evaluation Challenge](https://age.grand-challenge.org/Details/)\n", "## Scleral spur localization Baseline (ResNet50+UNet)\n", "\n", "- To keep model training stable, images with coordinate == -1, were removed.\n", "\n", "- For real inference, you MIGHT keep all images in val_file_path file." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## requirement install" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!pip install xlrd" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Zip File Extract\n", "\n", "Assume `Training100.zip` and `Validation_ASOCT_Image.zip` are stored @ `./AGE_challenge Baseline/datasets/`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!unzip -q ../datasets/Training100.zip -d ../datasets/\n", "!unzip -q ../datasets/Validation_ASOCT_Image.zip -d ../datasets/" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Explore Data" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import csv\n", "import matplotlib.pyplot as plt\n", "import cv2\n", "import os, shutil\n", "import pprint\n", "import pandas as pd\n", "from mpl_toolkits.mplot3d.axes3d import Axes3D\n", "\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "data_root_path = \"../datasets/Training100/\"\n", "xlsx_file_path = os.path.join(data_root_path, \"Training100_Location.xlsx\")\n", "\n", "image_path = os.path.join(data_root_path, \"ASOCT_Image\")\n", "label_file_path = os.path.join(data_root_path, \"train_loc.csv\")\n", "\n", "train_file_path = os.path.join(data_root_path, \"loc_train_split.csv\")\n", "val_file_path = os.path.join(data_root_path, \"loc_val_split.csv\")\n", "\n", "img_save_path = os.path.join(data_root_path, \"ASOCT_Image_loc\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | ASOCT_Name | \n", "Left_Label | \n", "X1 | \n", "Y1 | \n", "Right_Label | \n", "X2 | \n", "Y2 | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "T0056-10.jpg | \n", "1 | \n", "228.833656 | \n", "466.959601 | \n", "1 | \n", "1870.803864 | \n", "451.592300 | \n", "
1 | \n", "T0047-06.jpg | \n", "1 | \n", "207.935545 | \n", "525.938764 | \n", "1 | \n", "1792.231404 | \n", "432.521881 | \n", "
2 | \n", "T0066-15.jpg | \n", "0 | \n", "239.372633 | \n", "476.273925 | \n", "0 | \n", "1899.775568 | \n", "501.007410 | \n", "
3 | \n", "T0025-15.jpg | \n", "0 | \n", "177.708404 | \n", "545.655935 | \n", "0 | \n", "1862.380363 | \n", "439.228928 | \n", "
4 | \n", "T0088-06.jpg | \n", "0 | \n", "285.256170 | \n", "735.076014 | \n", "0 | \n", "1884.122651 | \n", "767.858589 | \n", "