huiqu18 / FullNet-varCE

Pytorch implementation of FullNet-varCE
55 stars 13 forks source link

Request for help of labels_instance images #13

Closed rocketche closed 3 years ago

rocketche commented 4 years ago

Thanks for sharing! I'm really interested in this project but I encountered some problems in duplicating the code. You've said that:

For MultiOrgan dataset, generate the instance labels from the .xml annotation files. Use uint16 instead of uint8 to assign a unique integer for each nucleus.

I ran the code downloaded from https://drive.google.com/file/d/0ByERBiBsEbuTRkFpeHpmUENPRjQ/view, and I got images from the .xml files. Like that: TCGA-18-5592-01Z-00-DX1 TCGA-18-5592-01Z-00-DX1.png

If I directly run weight_map.m using these images, the output is unsatisfied. Like this: TCGA-18-5592-01Z-00-DX1_weight

And I found that the the value of label-instance images didn't have much intergers(only have 0, 32896, 65535). Like this: 2020-11-05_103453

Therefore, I think this is because I ignored ①Use uint16 instead of uint8assign a unique integer for each nucleus.

Am I right with my analysis? Would you like to share the code of this step(① and ②) or share some hints of this step? Thank you very much.

P.S. the ternary-label images are fine so far but the weight-map images are not right as you can see.

huiqu18 commented 3 years ago

@rocketche In the online code to generate labels from .xml files (create_maps.m), add a nuclei mask to assign each nucleus a unique integer mask_nuclei(t>0) = zz in the for loop starting from Line 65. Then save this mask_nuclei as uint16, which is the instance label I used in my code.

rocketche commented 3 years ago

@huiqu18 Thank you very much!