{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# [Angle closure Glaucoma Evaluation Challenge](https://age.grand-challenge.org/Details/)\n", "## Scleral spur localization Baseline (RCNN)\n", "\n", "- To keep model training stable, images with coordinate == -1, were removed.\n", "- For real inference, you MIGHT keep all images in val_file_path file." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Training\n", "\n", "- Assume `Training100.zip` and `Validation_ASOCT_Image.zip` are stored @ `./AGE_challenge Baseline/datasets/`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Download PaddleDetection\n", " https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/PaddleDetection\n", " \n", "- To use Origin PaddleDetection for AGE loc task :\n", "- Replace `PaddleDetection/configs/cascade_rcnn_r50_fpn_1x.yml` with `./cascade_rcnn_r50_fpn_1x.yml`\n", "- Or, you might edit configs/cascade_rcnn_r50_fpn_1x.yml\n", "\n", "```\n", "max_iters: 12960\n", "snapshot_iter: 2000\n", "LearningRate:\n", " milestones: [6000, 8000]\n", "```\n", "\n", "for more details, see [PaddleDetection Docs](https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/PaddleDetection/docs)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Custom dataset (coco type)\n", "\n", "- coco type json files and folder architecture was constructed in pervious cell.\n", "- Under data10461/Training100/, you need these three folders:\n", "\n", "```\n", "annotations\n", "\tinstances_train2017.json\n", "\tinstances_val2017.json\n", "train2017\n", "\t***.jpg\n", "val2017\n", "\t***.jpg\n", "```\n", "\n", "for more details, see [Data.md](https://github.com/PaddlePaddle/models/blob/develop/PaddleCV/PaddleDetection/docs/DATA.md), [Data.md中文版](https://github.com/PaddlePaddle/models/blob/develop/PaddleCV/PaddleDetection/docs/DATA_cn.md)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/home/aiib-mia/Desktop/shangfangxin/AGE_challenge Baseline/LocalizationRCNN/PaddleDetection\n" ] } ], "source": [ "!rm -rf ./PaddleDetection/dataset/coco\n", "# you might replace this path to absolute path\n", "!ln -sf ../../../datasets/Training100/ ./PaddleDetection/dataset/coco\n", "%cd ./PaddleDetection" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "env: PYTHONPATH=./\n", "./\r\n" ] } ], "source": [ "%set_env PYTHONPATH=./\n", "!echo $PYTHONPATH" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# too many lines of training log, set print frequence to per 1000 steps. 12960 steps in total\n", "!python tools/train.py -c configs/cascade_rcnn_r50_fpn_1x.yml -o log_iter=1000" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "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.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }