Closed jacksonjacobs1 closed 10 months ago
might depend on the particular module - the older ones might be more robust in that context than the newer ones? perhaps we missed some error checking code?
Hi @choosehappy & @jacksonjacobs1:
An empty mask (No tissue detected mask) may occur for many reasons such as setting incorrect arguments for modules in config file (area_threshold
in remove_small_objects
function) or random behaviors ( Classification.byExampleWithFeatures
function by using subsampling and RandomForestClassifier
function)
The LocalTextureEstimationModule.estimateGreyComatrixFeatures
function that doesn't verify the used mask before computation causes the pipeline failure. Many modules verify the mask first before computation in HistoQC such as:
https://github.com/choosehappy/HistoQC/blob/master/histoqc/DeconvolutionModule.py#L35
https://github.com/choosehappy/HistoQC/blob/master/histoqc/HistogramModule.py#L61
It is easy to fix. Lets check the mask is empty and abort early before doing the estimate. Please check PR #279.
Hi Ruth,
You can try to remove nsamples_per_example: 10000
in ClassificationModule.byExampleWithFeatures:pen_markings which probably could fix the pipeline failure issue but will increase the computation time.
Or you can try PR #279https://github.com/choosehappy/HistoQC/pull/279 which fixes the pipeline failure but the no tissue mask probably still exists.
Best,
Nan
From: Ruth Cranston @.> Sent: Thursday, January 4, 2024 8:44 AM To: choosehappy/HistoQC @.> Cc: Li, Nan @.>; Assign @.> Subject: [External] Re: [choosehappy/HistoQC] Pipeline fails when no tissue remains (Issue #278)
Hi,
I've found this issue with my own images. I found that uncommenting ClassificationModule.byExampleWithFeatures:pen_markings in any config file caused my run to fail. I think maybe this threshold is too high for my image set - I'm going to try changing the threshold and see if I can get it to work.
— Reply to this email directly, view it on GitHubhttps://github.com/choosehappy/HistoQC/issues/278#issuecomment-1877210844, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJSZZPHW7YYJFZATKHB3XDDYM254VAVCNFSM6AAAAABA5C4OHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXGIYTAOBUGQ. You are receiving this because you were assigned.Message ID: @.***>
I've observed an issue where HistoQC skips files (i.e, does not save masks and does not write a row to the tsv file) when no tissue remains in the usable tissue mask:
This is not desired behavior because we still want to capture the extracted characteristics from these "poor quality" images.
It looks like the problem stems from passing an empty array (related to the usable tissue mask) into a downstream module (I don't believe this problem is specific to the
LocalTextureEstimationModule.estimateGreyComatrixFeatures
function.I am using the
config_v2.1.ini
with the classification module steps uncommented.