Hello, I attempted to use your code without any changes, however I encountered an issue with the process_tiles function.
In brief, the issues arise specifically inside this part of quality_assessment/run.py:
focus_artfcts = np.memmap(tmp_focus_artfcts_file, dtype=output_dtype, mode='w+', shape=(h_map, w_map))
stain_artfcts = np.memmap(tmp_stain_artfcts_file, dtype=output_dtype, mode='w+', shape=(h_map, w_map))
normal = np.memmap(tmp_normal_file, dtype=output_dtype, mode='w+', shape=(h_map, w_map))
other_artfcts = np.memmap(tmp_other_artfcts_file, dtype=output_dtype, mode='w+', shape=(h_map, w_map))
folding_artfcts = np.memmap(tmp_folding_artfcts_file, dtype=output_dtype, mode='w+', shape=(h_map, w_map))
usblty = np.memmap(tmp_usblty_file, dtype=output_dtype, mode='w+', shape=(h_map, w_map))
processed_region = np.memmap(tmp_processed_region_file, dtype=output_dtype, mode='w+', shape=(h_map, w_map))
These variables are all numpy matrices initialized with zeros.
Then, the process_tiles function gets called.
I added some print and pdb in eval_quality, more specifically here:
usblty[nrow, ncol] = out[0]
normal[nrow, ncol] = out[1]
stain_artfcts[nrow, ncol] = out[2]
focus_artfcts[nrow, ncol] = out[3]
folding_artfcts[nrow, ncol] = out[4]
other_artfcts[nrow, ncol] = out[5]
processed_region[nrow, ncol] = 1
This function is called inside the process_tiles function, if my understanding is correct.
On inspection, I found that out is a non-zero vector. Furthermore, I examined the tile and confirmed that it is a completely normal picture showing a tile from the slide given as an input. I have also printed the sum of the those matrices using the np.sum() function, and I am quite certain that they are matrices with non-zero values at that particular moment.
However, after the function process_tiles, all the matrices inside slide_info are only filled with zeros:
slide_info = {'focus_artfcts': focus_artfcts, 'stain_artfcts': stain_artfcts, 'normal': normal,
'other_artfcts': other_artfcts, 'folding_artfcts': folding_artfcts, 'usblty': usblty,
'processed_region': processed_region}
and this leads to some plain gray-filled images as outputs.
How can this be fixed ?
Thank you
Hello, I attempted to use your code without any changes, however I encountered an issue with the
process_tilesfunction.In brief, the issues arise specifically inside this part of
quality_assessment/run.py:These variables are all numpy matrices initialized with zeros.
Then, the
process_tilesfunction gets called.I added some
printandpdbineval_quality, more specifically here:This function is called inside the
process_tilesfunction, if my understanding is correct.On inspection, I found that
outis a non-zero vector. Furthermore, I examined thetileand confirmed that it is a completely normal picture showing a tile from the slide given as an input. I have also printed the sum of the those matrices using thenp.sum()function, and I am quite certain that they are matrices with non-zero values at that particular moment.However, after the function
process_tiles, all the matrices insideslide_infoare only filled with zeros:and this leads to some plain gray-filled images as outputs.
How can this be fixed ?
Thank you