Coder Social home page Coder Social logo

conic's Introduction

CoNIC: Colon Nuclei Identification and Counting Challenge

In this repository we provide code and example notebooks to assist participants start their algorithm development for the CoNIC challenge. In particular we provide:

  • Evaluation code

    • Segmentation & classification: multi-class panoptic quality (mPQ+)
    • Predicting cellular composition: multi-class coefficient of determination (R2)
  • Example notebooks

    • Data reading and simple dataset statistics
    • HoVer-Net baseline inference

NEWS: We have now released the training code that we used to train the baseline method (HoVer-Net). For this, we created a new branch, named conic in the original HoVer-Net repository. Click on this link to access the code!

Output format for metric calculation

To appropriately calculate the metrics, ensure that your output is in the following format:

  • Instance Segmentation and classification map:

    • .npy array of size Nx256x256x2, where N is the number of processed patches.
    • First channel is the instance segmentation map containing values ranging from 0 (background) to n (number of nuclei).
    • Second channel is the classification map containing values ranging from 0 (background) to 6 (number of classes in the dataset).
  • Composition prediction:

    • Single .csv file where the column headers should be:
      • neutrophil
      • epithelial
      • lymphocyte
      • plasma
      • eosinophil
      • connective
    • To make sure the calculation is done correctly, ensure that the row ordering is the same for both the ground truth and prediction csv files.

Metric calculation

To get the stats for segmentation and classification, run:

python compute_stats.py --mode="seg_class" --pred=<path_to_results> --true=<path_to_ground_truth>

To get the stats for cellular composition prediction, run:

python compute_stats.py --mode="regression" --pred=<path_to_results> --true=<path_to_ground_truth>

Cite

If you are comparing against any of the methods within the challenge or using this repository or using our dataset, you must cite:

  • Graham, Simon, et al. "CoNIC Challenge: Pushing the frontiers of nuclear detection, segmentation, classification and counting." Medical image analysis 92 (2024): 103047.
@article{graham2024conic,
  title={CoNIC Challenge: Pushing the frontiers of nuclear detection, segmentation, classification and counting},
  author={Graham, Simon and Vu, Quoc Dang and Jahanifar, Mostafa and Weigert, Martin and Schmidt, Uwe and Zhang, Wenhua and Zhang, Jun and Yang, Sen and Xiang, Jinxi and Wang, Xiyue and others},
  journal={Medical image analysis},
  volume={92},
  pages={103047},
  year={2024},
  publisher={Elsevier}
}
  • Graham, Simon, et al. "Lizard: A Large-Scale Dataset for Colonic Nuclear Instance Segmentation and Classification." Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021.
@inproceedings{graham2021lizard,
  title={Lizard: a large-scale dataset for colonic nuclear instance segmentation and classification},
  author={Graham, Simon and Jahanifar, Mostafa and Azam, Ayesha and Nimir, Mohammed and Tsang, Yee-Wah and Dodd, Katherine and Hero, Emily and Sahota, Harvir and Tank, Atisha and Benes, Ksenija and others},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={684--693},
  year={2021}
}

conic's People

Contributors

simongraham avatar vqdang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

conic's Issues

Does the lable "Lymphocyte" in CoNIc or Lizard include macrophage?

I read the Hovernet and Lizard papers. I know Inflammatory cells in hovernet include many subtypes, such as lymphocyte, plasma, neutrophil, macrophage or eosinophil.
The Lizard dataset include epithelial cells, connective tissue cells, lymphocytes, plasma cells, neutrophils and eosinophils. What about macrophages? Is it included in lymphocytes in Lizard dataset? Or macrophages are not annotated in the patches in Lizard?

Baseline Training Code

Hi TIA Group,

Thank you for holding such an amazing challenge!

I was wondering that if you are going to release the training code of the baseline checkpoint provided? As I tried to train a HoVerNet myself and found that I could only reach:

PQ mPQ
0.5753 0.3848

with the original training code and the new post-processing strategy(resize it to 40x resolution).

It would be more than great if you can release the training code of the baseline checkpoint. Thanks a lot!

Best Regards,
Winnie

containner has 2 image?

b44162e710a029f3f2037b962287585
this is our submission feedback.

In my machine, when I use ./test.sh, it can run very well.
But only docker run error occurs as follow,
image

convert checkpoints

how to convert trained results .tar to available .pth?

P.S. I'm just an undergraduate of grade 2. If there is any docs I haven't considered, please point out. Thx.

About PQ in baseline

Could you please explain how PQ is calculate in baseline?
Given semantic_predictions and semantic_true in baseline
I can get mPQ+ = 0.49975367875956067 ≈ 0.4998 as given.
However, I cannot get PQ right (0.6149) as shown in the table.
Does is mean Binary PQ described in Lizard

Given semantic_predictions and semantic_true in baseline, when calculating pq by pitcture
1018 samples decrease to 982, meaning there are 36 patches get iou_sum/(tp+0.5fp+0.5fn) as infinate.
there is nothing to predict (cropped blank from origin picture or no nuclei in it)
eg. patches from dataset pannuke images No. 1,4,6,11 etc.

Or is there something I mistake. Plz point out.

Best regards!

Why dice value is still zero?

I used the baseline code, and just update the method to upsample. I haven't changed other configurations.
When I start to train and infer model, I found the value of infer-valid-tp_dice_5 keeping zero after epoch=13(when infer).
I don't no why.

Report Error when using docker to predict and save output files

Hi TIA Group,

Thank you for holding such an amazing challenge!

I have trained the network and prepared to submit according to the docker-template branch. As you showed in the video, I successfully used the non docker local environment to get its output.
image-20220216004732806

After that, I successfully created the docker container and put execute_ IN_ Docker = true modify LOCAL_INPUT and LOCAL_ OUTPUT in test.sh. However, I encountered some difficulties. Docker uses GPU and completes infering.

However, an error occurred while saving the output. The output log is as follows:
What is the reason for this? How can I solve this problem?

Best regards!

P.S. I used Ubuntu18.04 and I have tried to switch to root and execute sudo ./test.sh , but the above error is still encountered.


Successfully tagged conic-inference:latest
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.

Working Directory: /opt/algorithm

>>>>>>>>>>>>>>>>> Start User Script

INPUT_DIR: /input/
-/input/
--F-/input/images.mha
USER_DATA_DIR:  ['hovernet-conic.pth', 'net_epoch=50.tar']
-/opt/algorithm/data/
--F-/opt/algorithm/data/hovernet-conic.pth
--F-/opt/algorithm/data/net_epoch=50.tar
OUTPUT_DIR: /output/
CUDA: True
---Device 0: GeForce RTX 3080 Ti
---Device 1: GeForce RTX 3080 Ti
/opt/algorithm/data//net_epoch=50.tar
Process Batch: 100%|##############################| 4/4 [00:04<00:00,  1.17s/it]Infer time:  7.805699825286865

Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/conda/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/algorithm/process.py", line 35, in <module>
    run(**ENTRY)
  File "/opt/algorithm/source/main.py", line 203, in run
    f"{OUT_DIR}/pred_seg.mha"
  File "/home/algorithm/.local/lib/python3.7/site-packages/itk/support/extras.py", line 848, in imwrite
    writer.Update()
RuntimeError: /work/ITK-source/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:1128:
ITK ERROR: MetaImageIO(0x555dd7b28080): File cannot be written: /output///pred_seg.mha
Reason: Permission denied

Requirement for the entire test data.

Dear all,
Thanks for the awesome work.

Recently, I am experimenting with my nuclei detection algorithm on the CoNIC data. To avoid unnecessary controversy over data splitting, could you public the entire test data?
I will cite your related paper in my research.

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.