Skip to main content

Accelerate data driven research on embryos with Pre-Trained deep learning models

Project description

Contents

Segmenting the C. elegans embryo

  • Importing the model
from devolearn import embryo_segmentor
segmentor = embryo_segmentor()
  • Running the model on an image and viewing the prediction
seg_pred = segmentor.predict(image_path = "sample_data/images/seg_sample.jpg")
plt.imshow(seg_pred)
plt.show()
  • Running the model on a video and saving the predictions into a folder
segmentor.predict_from_video(video_path = "sample_data/videos/seg_sample.mov")

Generating synthetic images of embryos with a Pre-trained GAN

  • Importing the model
from devolearn import Generator, embryo_generator_model
generator = embryo_generator_model()
  • Generating a picture and viewing it
gen_image = generator.generate()  
plt.imshow(gen_image)
plt.show()
  • Generating n images and saving them into foldername with a user set size
generator.generate_n_images(n = 5, foldername= "generated_images", image_size= (700,500))

Predicting populations of cells within the C. elegans embryo

  • Importing the population model for inferences
from devolearn import lineage_population_model
  • Loading a model instance to be used to estimate lineage populations of embryos from videos/photos.
model = lineage_population_model(mode = "cpu")
  • Making a prediction from an image
print(model.predict(image_path = "sample_data/images/embryo_sample.png"))
  • Making predictions from a video and saving the predictions into a CSV file
results = model.predict_from_video(video_path = "sample_data/videos/embryo_timelapse.mov", save_csv = True, csv_name = "video_preds.csv", ignore_first_n_frames= 10, ignore_last_n_frames= 10 )
  • Plotting the model's predictions
plot = model.create_population_plot_from_video(video_path = "sample_data/videos/embryo_timelapse.mov", save_plot= True, plot_name= "plot.png", ignore_last_n_frames= 0 )
plot.show()

Contact us

Authors/maintainers:

Feel free to join our slack!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devolearn-0.1.7.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

devolearn-0.1.7-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file devolearn-0.1.7.tar.gz.

File metadata

  • Download URL: devolearn-0.1.7.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for devolearn-0.1.7.tar.gz
Algorithm Hash digest
SHA256 77e33208e514b5a8bc8ca0be23e77a7d764d1fa817496d0f0972c3ac77c2d9ba
MD5 18c97f0902cd724afe5a082963319713
BLAKE2b-256 1ae4eb4c2d9129a59996dd52d7d622a5fd40d4f5027a5a4c3f229fa27d4aa0e2

See more details on using hashes here.

File details

Details for the file devolearn-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: devolearn-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for devolearn-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ebb5d6eec6b24fe3102ebea6a4fe3cad3ccd3231c434e1b5554db4012d9d498b
MD5 6e9304de476d095e65176e73476bdac2
BLAKE2b-256 8d632dfcf95688883e5f4c31f9ee534b1740aa7a69d058f97da77799e6450ffc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page