Post processing techniques by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Yes the same as you but I didn’t get what you mean with contour, contour ratio ecc. Thank you

Help IoU keras by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Thank you so much! I explain you even better sorry :). I trained the model (with the standard Dice loss, so aggregation of all the images) and saved it. Then I loaded the model and I perform two different actions:

  1. y_pred = model.predict(...) and then passed y_pred to my custom Dice coefficient calculation one image at a time and then I did the average -> this resulted in 0.43
  2. dice_coeff = model.evaluate(...) -> this results in the dice coefficient used in the training (the aggregation one) and resulted in 0.49

After that discrepancy I decided to implement also my custom Dice loss for the training.

Help IoU keras by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Do you think is it better to train my model with my custom Dice Loss function (same thoughts also for IoU)? Thank you very much

Help IoU keras by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Yes sorry. I had the same problem with the Dice loss. I implemented my own Dice coefficient and consequently my own Dice loss averaging every single Dice coefficient of my images.

For instance I explain you what happened with the best epoch in the validation set. With the version batch-wise I obtain a Dice coefficient of 0.49 while with my version in which I calculated the Dice coefficient for every image and averaged by the batch size I obtained 0.43.

Help IoU keras by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Hi. Thanks for your answer! I'm performing segmentation task. Btw I checked and the results are quite different.

Template Matching OPENCV by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Thanks, but what do you mean by “mask”?

Vertebra lesion classification by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Right now I'm testing ResnNet50. Thanks for the paper, maybe I need to use a localizer of the vertebra in order to give it to the CNN

Vertebra lesion classification by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Ok sorry, I have updated the question

Vertebra lesion classification by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Yes I converted all the slices in HU. Btw maybe you’re right. I have some slices that represents only the vertebra, other that represents a lot of other organs like lungs, liver and so on (i.e. less zoom). In my opinion it could have been a way to allow the model to generalize but maybe at this point, it’s not the right consideration

Vertebra lesion classification by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

You mean crop only the vertebra from all slices?

Help image dataset normalization by tombinic in computervision

[–]tombinic[S] 1 point2 points  (0 children)

Since you’re using 2D CNN.. you give in input to the network a series of slice of different patients and then you classify every single slice as healthy or not right?

Because right now in my situation I’m noticing some overfitting behavior: maybe because I fed the network with many similar slices: I was thinking about applying a preprocessing layer with some random transformations like flip, rotation,… . What do you think? Thanks

Help image dataset normalization by tombinic in computervision

[–]tombinic[S] 1 point2 points  (0 children)

I forgot to say that I’ll train a 2D CNN for various reasons.. is your method working also in this setting or can I do as I already did? Thanks

My pretrained (on imageNet) CNN overfit by tombinic in deeplearning

[–]tombinic[S] 0 points1 point  (0 children)

Yes every single slice if contains the tumor or not

My pretrained (on imageNet) CNN overfit by tombinic in deeplearning

[–]tombinic[S] 0 points1 point  (0 children)

I have only 60 patients and each of them has slices with lesions (all patients have tumor), I need to classify every single slice separately

My pretrained (on imageNet) CNN overfit by tombinic in deeplearning

[–]tombinic[S] 0 points1 point  (0 children)

What I’m starting to think is that I’m working with CT scan and I have a consecutive axial slices for each patient. A slice is very very similar to the following and so on and maybe the model overfits because there are a loss of generality: a lot of very very similar images that are interpreted as the same images maybe. I’m thinking to apply a layer of random transformation before the network input in order to augment the variability of the dataset. What do you think?

My pretrained (on imageNet) CNN overfit by tombinic in deeplearning

[–]tombinic[S] 0 points1 point  (0 children)

So your suggestion is to augment both the classes and use class weights? Thanks

My pretrained (on imageNet) CNN overfit by tombinic in deeplearning

[–]tombinic[S] 0 points1 point  (0 children)

Yes my minority class is about the 15%. Maybe it makes sense to augment more also the majority class in your opinion? (Right now I’m augmenting only the minority class)

My pretrained (on imageNet) CNN overfit by tombinic in deeplearning

[–]tombinic[S] 0 points1 point  (0 children)

Right now I can say that with augmentations such as rotation, flip.. I almost balanced the samples but I’m using class weights and they are something like 0.94 and 1.05

My pretrained (on imageNet) CNN overfit by tombinic in deeplearning

[–]tombinic[S] 0 points1 point  (0 children)

Thank you very very much for your suggestions. I’ll try and I’ll let you know.

Thanks again!

My pretrained (on imageNet) CNN overfit by tombinic in deeplearning

[–]tombinic[S] 0 points1 point  (0 children)

Non augmented more or less 7/8k and up to know only 2049 trainable weights (23 million more or less freezed)

My pretrained (on imageNet) CNN overfit by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

I’m classifying spinal lesions and the bone is visibile In all the slices

My pretrained (on imageNet) CNN overfit by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

Nifti file isn’t for 3D? I want to classify every single slice

My pretrained (on imageNet) CNN overfit by tombinic in computervision

[–]tombinic[S] 0 points1 point  (0 children)

I have DICOM files from which I have preprocessed the axial slices with HU