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

How to get the most accurate result #12

Open
PapaMadeleine2022 opened this issue May 19, 2020 · 8 comments
Open

How to get the most accurate result #12

PapaMadeleine2022 opened this issue May 19, 2020 · 8 comments

Comments

@PapaMadeleine2022
Copy link

Hello, when I test your test.py with models/mnv3_seg/munet_mnv3_wm10.h5 and models/mnv3_seg/munet_mnv3_wm10.h5, I find the result is not very good. What model and parameters I should set to get the accurate result? Can you give some advises?

Thanks.

@anilsathyan7
Copy link
Owner

I tried a different setting for this model, refer comment: #5 (comment)
See the failure cases section for model output comparison.
You may need to increase the number of filters in the model and perhaps train with AISegment dataset for better accuracy

@anilsathyan7
Copy link
Owner

anilsathyan7 commented May 19, 2020

There may be couple of others reason...

  1. If you compare mobilenetv2(depth multiplier 0.5) with mobilenetv3(depth` multiplier 1.0) the latter has slightly less accuracy(65.4 vs 61.9 top1).

  2. There were no pretrained keras checkpoints for mobilentv3, so i had to train from scratch using the tflite model as reference.

@PapaMadeleine2022
Copy link
Author

@anilsathyan7 Thanks for your reply. In the first reason you said mobilenetv2(depth multiplier 0.5) has more high accuracy ?

@PapaMadeleine2022
Copy link
Author

@anilsathyan7 the models under dir models/segvid_mnv2_port256 is for the model described in Model Type - 3 ?

@anilsathyan7
Copy link
Owner

anilsathyan7 commented May 19, 2020

If you go to the aforementioned mobilenetv3 link, there are different version of the model.

  • Only minimalistic versions can be run on android gpu(supported operations)
  • The small minimilastic version has lower accuracy but is faster than mobilenetv2 dm05
  • The large minimilastic version has higher accuracy but is slower than mobilenetv2 dm05

You can get the pretrained model with weights using the below code:-
mnv3=keras.applications.keras_applications.mobilenet_v3.MobileNetV3Large(input_shape=(224, 224, 3),alpha=1.0, minimalistic=True, include_top=False, weights='imagenet', backend=tf.keras.backend, layers=tf.keras.layers, models=tf.keras.models, utils=tf.keras.utils)

Now you can replace the encoder part in our model with this, connect it to the decoder and finally train the model.

Model-3 is prisma-net architecture and the models in the directory: models/segvid_mnv2_port256 are the mobinenetv2 based models with size 256.

@ldenoue
Copy link

ldenoue commented Jun 1, 2020

What is the model that you have under tensorflowjs?

@kooler
Copy link

kooler commented Sep 13, 2020

Curious about the question above as well. Tried to convert all models from h5 to TensorFlowJS, but none of them seems to perform as well as the exiting one.

@anilsathyan7
Copy link
Owner

The model under tfjs is 'deconv_fin_munet'. It's a model with 128 input isize ,inside folder models/transpose_seg.

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

4 participants