Coder Social home page Coder Social logo

Comments (3)

dchaley avatar dchaley commented on September 15, 2024

Results on local environment are very promising.

Before:

Loaded model in 12.3 s
Ran prediction in 1.25 s; success: True

After:

Loaded model in 0.84 s
Ran prediction in 1.19 s; success: True

This is the time to load the model from disk, not to fetch it from storage.

Once the PR is merged we can test on cloud.

from deepcell-imaging.

dchaley avatar dchaley commented on September 15, 2024

The new model is uploaded:

gs://genomics-data-public-central1/cellular-segmentation/vanvalenlab/deep-cell/vanvalenlab-tf-model-multiplex-downloaded-20230706/MultiplexSegmentation-resaved-20240710.h5

Its md5 hash is: 56b0f246081fe6b730ca74eab8a37d60
gs://genomics-data-public-central1/cellular-segmentation/vanvalenlab/deep-cell/vanvalenlab-tf-model-multiplex-downloaded-20230706/MultiplexSegmentation-resaved-20240710-md5.txt

It was generated like so:

model =  tf.keras.models.load_model("/Users/davidhaley/.keras/models/MultiplexSegmentation")
model.save("MultiplexSegmentation-resaved-20240710.h5")

It seems to be really that simple… but, see upcoming PR for caveats on loading the .h5 model.

from deepcell-imaging.

dchaley avatar dchaley commented on September 15, 2024

Cloud results πŸŽ‰

Before:

Reading model from /root/.keras/models/MultiplexSegmentation.
Loaded model in 8.99 s
Ran prediction in 2.82 s; success: True

After:

Loading model from: /root/.keras/models/MultiplexSegmentation-resaved-20240710.h5
Loaded model in 2.68 s
Ran prediction in 2.79 s; success: True

Summary of results:

Environment Before After Diff
Macbook M3 Max Pro 12.3 s 0.84 s -11.46 s (-93%)
n1-standard-8 w/ 1 T4 GPU 8.99 s 2.68 s -6.31 s (-70%)
n1-standard-32 w/ 1 T4 GPU 8.21s 2.72 s -5.49 s (-67%)

Of note, loading the model into memory used to take ~3x the time of predicting the 512x512 image. Now it's roughly the same.

from deepcell-imaging.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.