Can I know ways to have a heatmap generated on an image? Take for example, bone fracture detection. The image should be coloured on the area where there exists a fracture and not anywhere else on the provided.
Noting that I haven't tried this method, by proper segmentation, I do have an idea that may work in order to determine the fracture locations on CT images.
In order to do all the processes that I am going to mention below you can use softwares like 3DSlicer or ITKSnap, or you can directly code it on MATLAB or Python which provides powerful DICOM editing libraries. Those are the options that I most frequently use, however there are many other ways that may be more convenient for your usage.
As a summary, we will follow the edge of the bone, and determine where the continuity gets broken.
To begin with, as I also said, proper segmentation process is necessary in order to locate the bone location. As a result of this process our image needs to be binary.
After locating the bone, an edge detection process needs to be applied. Since our image was already binary after segmentation, applying the edge detection process will give us the edges as 1's or 0's, and the rest of the image will be the opposite.
Finally we will use a convolution kernel to scan each pixel of our image (convolution operation). Whenever our kernel crosses with a group of edge pixels, it will try to fit a line passing through the edge pixels enclosed by the boundaries of our kernel, and eventually will calculate an error for the line fit.
the kernel regions with high errors most probably will show you the turning points of the bone edge, but the highest errors will be caused by discontinuities which may indicate fracture regions.
By using the error data obtained by the convolution operation, you may visualize it as you like.
I hope that I explained what my approach would be like as clear as possible. If something is not clear, please do not hesitate to ask.
Ogulcan Guldeniz , I found an algorithm named Grad Cam algorithm which superimposes the heatmap on the input image. But ,I think since the heatmap has to be more intense or 'reddish' near discontinuities in the bone, I am not sure if the algorithm may actually work in my case.
You mentioned this in your reply:-
" 4. the kernel regions with high errors most probably will show you the turning points of the bone edge, but the highest errors will be caused by discontinuities which may indicate fracture regions.
5. By using the error data obtained by the convolution operation, you may visualize it as you like. "
So, the error for each value in the tensors has to be calculated after each convolutional block is it?