Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add polyp segmentation #169

Closed

Conversation

Kaushal-11
Copy link

Resizing images to a fixed size (256x256)
Normalizing pixel values (0-255 to 0-1 range)
Using metrics like accuracy, recall, and precision
Logging training progress and metrics to a CSV file
Applying a threshold (0.5) to convert probabilities to binary masks
Calculating evaluation metrics like Accuracy, F1 Score, Jaccard Index (IoU), Recall, Precision
Visualizing results : [ Original image | Ground truth mask | Predicted mask]

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @Kaushal-11! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project.

We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines

@SrijanShovit
Copy link
Owner

Modify it for different activation functions and optimizers

@Kaushal-11
Copy link
Author

Other activation functions and optimizers did not yield as good results in terms of segmentation accuracy and training efficiency.

because there is main reason of using in such a complex model,
In input layer, ReLu handle the vanishing gradient problem.
in output layer, Sigmoid is suitable for binary segmentation tasks.

and Adam optimizer is good for it because of it dynamically adjusts the learning rate during training

So, this combination is giving me good accuracy for this segmentation

@SrijanShovit
Copy link
Owner

Can you try K-Fold method, tune early stopping epochs, Selu, Mish activation, Lion optimizer

Do an experimentation of these with several models. Then come to a conclusion.

@Kaushal-11
Copy link
Author

I implemented my model with selu activation, Lion optimizer with K-Fold validation and EarlyStopping callbacks
but it is not give good results.

Here comparision between results,

Metric SELU + Lion + K-Fold + EarlyStopping ReLU + Adam
Accuracy 0.92316 0.94052
F1 Score 0.34482 0.55769
Jaccard 0.25670 0.44812
Recall 0.34664 0.60501
Precision 0.52644 0.61600

Result of (ReLU + Adam)

image

Result of (SeLU + Lion)

image

@Kaushal-11
Copy link
Author

I performed all possible combination and played with hyperparameter
I can conclude that
ReLU often provides more stable and faster convergence during training compared to SELU, Sigmoid, Mish, tanh.
The Adam optimizer, which works well with ReLU, provided better optimization and generalization in this scenario.

@SrijanShovit
Copy link
Owner

I performed all possible combination and played with hyperparameter I can conclude that ReLU often provides more stable and faster convergence during training compared to SELU, Sigmoid, Mish, tanh. The Adam optimizer, which works well with ReLU, provided better optimization and generalization in this scenario.

I don't agree. I have seen Mish and Selu completely outperform Relu sometimes. Anyways, have you tried some other strategies of augmentation or any different model?

@Kaushal-11
Copy link
Author

i inserted metrics results and final prediction image which derived using the SeLU.
Unfortunately in this problem, SeLU and Mish is not working well.

@Kaushal-11
Copy link
Author

Yes, I have tried Data Augmentation in my local,
And also implemented another model like DeepLabV3+ and ResUnet Model

@Kaushal-11
Copy link
Author

DeepLabv3+ model's results are not good as Unet
But ResUnet's results is not much good but slightly better than Unet Model

@Kaushal-11
Copy link
Author

Hey, @SrijanShovit

can you answer my message

@sanjay-kv
Copy link
Collaborator

@SrijanShovit I understand the above PR doesnt come along with your expectation, let the contributor know what to go with it.
Ideally its common in opnesource PR getting rejected. so let the contributor know are were proceeding with it or not.

@github-actions github-actions bot closed this Jul 11, 2024
Copy link

This issue has been automatically closed because it has been inactive for more than 7 days. If you believe this is still relevant, feel free to reopen it or create a new one. Thank you!

@sanjay-kv
Copy link
Collaborator

@SrijanShovit why there is no reply . we can help the contributor if you are not planning to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants