Commit 02469501 authored by mathpluscode's avatar mathpluscode

add data set structure

parent dffd037a
Pipeline #3243 failed with stages
in 3 minutes and 3 seconds
......@@ -30,6 +30,19 @@ yunguanfu-mil3id2019 supports Python 3.6.
yunguanfu-mil3id2019 is currently a demo project. It implements Yunguan Fu's paper `More unlabelled data or label more data? A study on semi-supervised laparoscopic image segmentation`_.
Data Set Structure
------------------
The data should be stored in `data/` as follows:
- ``data/img/``
- ``data/img/labeled/`` inside which, each folder corresponds to a patient. Some foldes' name contains HLS, these folders are ignored.
- ``data/img/labeled/LR01/`` inside which, each folder corresponds to the images extracted from a video.
- ``data/img/labeled/LR01/530/`` inside which, the images and labels are stored. For instance, if the name of an image is `x_left.png`, the label is available only if `x_leftMask.png` and `x_leftContour.png` both exist. It is possible that the mask file exists but is all black and the contour file doesn't exist.
- ``data/video/`` inside which, each folder corresponds to a patient.
- ``data/video/LR01/`` inside which, each folder corresponds to a video. Compared to the data in the server, the folders are selected and renamed manually to match the labeled data. Often the folder name contains only number ``LS09/556/``, it corresponds to the folder of labeled image ``2016.04.28_10-08-03-556``.
- ``data/video/LR01/530/`` inside which, the video is stored in ``.264`` format.
Example Usage
-------------
......@@ -72,13 +85,13 @@ Evaluate
python eval.py -p log/20190902225640-config -g 0 --eval
This code evaluates the models in the log folder. It calculates the prediction of each model of cross validation on the corresponding test set. The predictions of ``LR05`` will be saved in ``log/20190902225640-config/LR05/preds/final``.
This code evaluates the models in the log folder. It calculates the prediction of each model of cross validation on the corresponding test set. The predictions of ``LR01`` will be saved in ``log/20190902225640-config/LR01/preds/final``.
::
python eval.py -p log/20190902225640-config -g 0 --eval --all
This code calculates the prediction of each model of cross validation on all data, including training set and test set. The predictions of ``LR05`` will be saved in ``log/20190902225640-config/LR05/preds/final_all``.
This code calculates the prediction of each model of cross validation on all data, including training set and test set. The predictions of ``LR01`` will be saved in ``log/20190902225640-config/LR01/preds/final_all``.
Analyse
^^^^^^^
......@@ -89,8 +102,8 @@ Analyse
This code
* summarises the statistics of metrics
* generates the performance vs foreground proportion curve only for test set.
- summarises the statistics of metrics
- generates the performance vs foreground proportion curve only for test set.
::
......@@ -99,8 +112,8 @@ This code
This code
* summarises the statistics of metrics
* generates the performance vs foreground proportion curves, one for training and another one for test.
- summarises the statistics of metrics
- generates the performance vs foreground proportion curves, one for training and another one for test.
But it requires to evaluate with ``--all``
......@@ -109,9 +122,9 @@ Test
::
python test.py -p log/20190902225640-config/LR05 -d demo -g 0
python test.py -p log/20190902225640-config/LR01 -d demo -g 0
This code tests the model in the folder ``log/20190902225640-config/LR05`` on images inside ``demo/``.
This code tests the model in the folder ``log/20190902225640-config/LR01`` on images inside ``demo/``.
Developing
----------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment