question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues testing data with certain images

See original GitHub issue

I am successfully able to test the image ‘test_14.png’ into the network, but for ‘test_13.png’ after I use infer.py I get a warning saying the instance type is of background type and the image does not load. Also when i enter compute_stats.py I just get the output in https://github.com/vqdang/hover_net/issues/13#issuecomment-541759157 even though the directories are correct and I followed the steps.

This implies the input is corrupt somehow. Either way, it shouldn’t produce this for test_14 right as I got the correct output image from this and there were no errors in inference?

So just to check, as the paths are definitely right, can I confirm how many test images should there be in the CoNSeP dataset? I had troubles unzipping the file so i’m not sure if it has become corrupt, i only get test_13 & test_14, perhaps causing the issue. Also, the output should give both .mat and .png files out right?

It could also be an error with Numpy as when I run infer.py I get this:

FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)])

UPDATE: Although now I can’t even seem to get test_14.png to work…

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
simongrahamcommented, Mar 9, 2020

For the instance segmentation stats, we have added an argument into the run_nuclei_inst_stat() function. To print image stats, set print_img_stats=True in the argument. This function is located here:

https://github.com/vqdang/hover_net/blob/master/src/compute_stats.py#L206

Note, this is only for the instance segmentation metric.

In terms of the classification metric, the score is for the entire dataset - we don’t calculate the stats for each image because that wouldn’t make sense here. For instance, nuclei types are often spread out across the images and often don’t exist at the same time within one image. For 1 image, in the case that nuclei type t doesn’t exist, F1 is always zero (no TP and no TN possibly exist), but then how will you reflect FP of such classification on the overall score of the entire dataset? If you ignore it then that means you are skewing the actual performance of the model. However, you can report raw TP TN FP FN for each nuclei type of each image. This way you won’t miss out FP, but then you lose the summarizing power of F1. Displaying them (4 metrics for 4 types means 16 columns to track for just 1 model) for comparison of many models won’t be easy.

1reaction
vqdangcommented, Mar 8, 2020

I’m sorry but please check this to deal with the .mat problem. https://github.com/vqdang/hover_net/issues/16#issuecomment-551842003 . We will resolve this sometimes later to align all input format.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Seven Challenges in Image Quality Assessment - Hindawi
I specifically discuss challenges related to lack of complete perceptual models for: natural images, compound and suprathreshold distortions, and multiple ...
Read more >
Inflation of test accuracy due to data leakage in deep learning ...
Results show that the classification performance is inflated by 0.07 up to 0.43 in terms of Matthews Correlation Coefficient (accuracy: 5% to 30 ......
Read more >
A survey on Image Data Augmentation for Deep Learning
Altering the color distribution of images can be a great solution to lighting challenges faced by testing data (Figs.
Read more >
Image Data Collection: What it is and Best Practices - AIMultiple
What image data collection means for AI/ML training,; What challenges one might face while collecting it,; And what are some best practices ...
Read more >
What to do when your training and testing data come from ...
Studying the target data distribution — you found that the images are mostly blurry, low resolution, and similar to the following: Left: Dog...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found