lannguyen0910 / food-recognition

🍔🍟🍗 Food analysis baseline with Theseus. Integrate object detection, image classification and multi-class semantic segmentation 🍞🍖🍕
MIT License
274 stars 77 forks source link

Segmentation function not working #20

Closed tommyngx closed 2 years ago

tommyngx commented 2 years ago

Thank @kaylode and @lannguyen0910! you guys did a well-done project. I have tried to run the app notebook and found that the segmentation function is not working basically. the detection is working fine. Could you please check it out? I see you using Unet++ from segmentation from segmentation_models.pytorch. Could you please share with me a training notebook? I find it hard to make the right setup and data preparation. I would like to understand how to implement it correctly. You can share with me via my email at tommyfederation@gmail.com. Thank you so much!

lannguyen0910 commented 2 years ago

Hi @Tommy-Ngx, thanks for your question! The segmentation function is working normally, you can check out the image at static/assets/segmentations/.../masks path, it doesn't show up in the webapp because i set the wrong path, i will fix it soon. For the segmentation model, may i let @kaylode make it clear for you for more in-depth info.

kaylode commented 2 years ago

Hi @Tommy-Ngx, you can refer to this link, there are some code snippets for preparing the custom dataset. Basically, you need to write your own class to load the image and mask. Then, modify the configuration to use that class. Please look into that notebook, and feel free to ask if there is any question

tommyngx commented 2 years ago

@kaylode @lannguyen0910 Thank you so much for your friendly and supportive reply!