Giter Site home page Giter Site logo

giuseta / new-maxillo-dataset-segmentation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from potpov/new-maxillo-dataset-segmentation

0.0 0.0 0.0 60 KB

Source code for the paper: "Deep Segmentation of the Mandibular Canal: a New 3D Annotated Dataset of CBCT Volumes.", IEEE Access

Home Page: https://ditto.ing.unimore.it/maxillo/dataset/

Python 90.89% C 9.11%

new-maxillo-dataset-segmentation's Introduction

Alveolar canal 3D

3D neural network for the alveolar canal segmentation. Model and set-up is implemented from Jaskari et al.
This project is related to our recent work: our new 3D dense dataset can be downloaded here.

Usage

Once you have generated all the subsamples from our dataset you can run the experiments as follow:

usage: main.py [--base_config path]

optional arguments:
  --base_config         path to your config.yaml for this experiment
  --verbose             redirect stream to std out instead of using a log file in the yaml directory
  --competitor          load training data as circle expansion instead of dense annotations
  --additional_dataset  load the additional patients
  --test                skip the training and load best weights for the experiment (no needs to update your yaml file)
  --skip_dump           if this flag is set the network does not dump prediction volumes on the final test
  --reload              load the last weights and continue the training (no needs to update your yaml file)
  --skip_primary        skip primary training test when loading data

Refer to the next sections for creating the circle expansion dataset and the subsamples needed for this repo.

Path dataset

To generate the patch dataset:

from utils import create_dataset
create_dataset(['train', 'syntetic', 'val', 'test'], is_competitor=True, saving_dir="/savedir/sparse")
create_dataset(['train', 'val', 'test'], is_competitor=False, saving_dir="/savedir/dense")

Alpha shape

To create the alpha shape version of your patients refers to "alpha_shape.py" in this repo.

Synthetic

to create the cyrcle-expanded dataset:

from utils import create_syntetic
create_syntetic()

YAML config example

Here is an example of a yaml file to use as base_config

data-loader:
  augmentations_file: "path/to/augmentation.yaml"
  batch_size: 24
  file_path: "path/to/your/datadir"
  labels:
    BACKGROUND: 0
    INSIDE: 1
  num_workers: 4
loss:
  name: Jaccard
lr_scheduler:
  name: null
model:
  name: Competitor
optimizer:
  learning_rate: 0.0001
  name: Adam
seed: 47
tb_dir: "/path/to/tensorboard/dir"
title: ExperimentTitle
trainer:
  checkpoint_path: "pathToWeights.pth or None"
  do_train: true
  epochs: 100

In addiction we created a factory for Augmentation which allows you to load augmentations from a yaml file. the following example can help you to make your own file. In our experiments we just used RandomFlip on all axes.

RandomAffine:
  scales: !!python/tuple [0.8, 1.2]
  degrees: !!python/tuple [15, 15]
  isotropic: false
  image_interpolation: linear
  p: 0.35
RandomElasticDeformation:
    num_control_points: 7
    p: 0.35
RandomFlip:
  axes: 2
  flip_probability: 0.7
RandomBlur:
  p: 0.25

Directories

Each experiment is expected to be placed into a result dir:

results/
├─ experiment_name/
│  ├─ checkpoints/
│  ├─ logs/
│  │  ├─ config.yaml
│  ├─ numpy/

If experiment_name does not exist, python will look for a config.yaml file in a config folder in your project directory.

new-maxillo-dataset-segmentation's People

Contributors

potpov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.