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

Training Code for Model on Custom Data #1

Open
NaeemKhan333 opened this issue Feb 18, 2021 · 2 comments
Open

Training Code for Model on Custom Data #1

NaeemKhan333 opened this issue Feb 18, 2021 · 2 comments

Comments

@NaeemKhan333
Copy link

@SwatiModi Thanks for such a nice work. I have a question related to the training model . I am working same sort of the problem , so I am using u2net segmentation Model for my solution . But it is really slow when I integrate it with my web-app code to run in the browser. Can you suggest me any way to improve my speed or can you provide your python training and testing script , So I can use it for my problem. Thanks

@SwatiModi
Copy link
Owner

SwatiModi commented Feb 21, 2021

Hi @NaeemKhan333, you can refer to the model architecture here, I had used MobileNetV1 as encoder backbone and a custom decoder. Also few things that you could try while building the model

  1. reducing width of the network by reducing input size(I had used 224x224, 160x160 or 192x192 shall also work well), and number of filters in each layer (if you are using keras you can directly adjust this by alpha ref)
  2. reducing the depth of network i.e. using as less layers in network as possible

In the custom decoder I have used constant number of of filters throughout, this will also help with optimizing the inference time
Also when deploying the model for web, WASM can be really helpful for speed boost - ref

@ilwoonam75
Copy link

@SwatiModi thank you for sharing this repo. I am also trying to make this kind of project. In my project, I need to segment 8 classes, so I have to train my own dataset. Can you share your traing code?

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

No branches or pull requests

3 participants