gotjd709 / hooknet

1 stars 1 forks source link

HookNet

This is my personal implementation(with Torch) of HookNet. I also summarize HookNet paper in my blog.

HookNet Structure

We propose HookNet, a semantic segmentation model for histopathology whole-slide images, which combines context and details via multiple branches of encoder-decoder convolutional neural networks. Concentric patches at multiple resolutions with different fields of view are used to feed different branches of HookNet, and intermediate representations are combined via a hooking mechanism. - Mart van Rijthoven. (2020)

Environment

pip install -r requirements.txt

Above, I install python 3.6 with CUDA 11.4

Description

Repository Structure

Training

Data Preparation
Hooknet
    ├ slide_num_1
    |       ├ input_x100
    |       ├ input_x50
    |       ├ input_x25
    |       ├ input_x12
    |       └ input_y1
    .
    .
    .
    └ slide_num_n
            ├ input_x100
            ├ input_x50
            ├ input_x25
            ├ input_x12
            └ input_y1    

if you want to train with hooknet(normal) or quad_scale_hooknet... (This model trains with valid padding.)

if you want to train with hooknet(se_resnext101_32x4d)... (This model trains with same padding.)


You can get this data structure by using util_multi.py

Train Example
python train.py 

You can adjust hyper parameters in config.py

Reference

paper

code