Skip to content

Commit

Permalink
add some information about the kaggle API
Browse files Browse the repository at this point in the history
  • Loading branch information
afoix committed Sep 26, 2023
1 parent 73c145d commit d181b05
Showing 1 changed file with 44 additions and 68 deletions.
112 changes: 44 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,67 @@
# bioimage_embed: Autoencoders for Biological Image Data
bio_vae is a Python package that provides a convenient way to train and use autoencoders on biological image data. It includes functions for loading and preprocessing images from common sources such as microscopy, and tools for visualizing the results of the autoencoder's encoding and decoding process.

bioimage_embed is an all-in-one Python package designed to cater to the needs of computational biologists, data scientists, and researchers working on biological image data. With specialized functions to handle, preprocess, and visualize microscopy datasets, this tool is tailored to streamline the embedding process for biological imagery.
Installation
To install bio_vae, use pip:

[![Build Status](https://img.shields.io/badge/build-passing-green.svg)](https://github.com/ctr26/bioimage_embed)
[![Python Version](https://img.shields.io/badge/python-3.7+-blue.svg)](https://github.com/ctr26/bioimage_embed)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/ctr26/bioimage_embed)
Copy code
pip install bio_vae
Usage
Loading and Preprocessing Images
bio_vae includes functions for loading and preprocessing images from microscopy datasets, such as those in the BioImage Data Resource and Cell Image Library.

---
# Installation

## Features
pip install git+https://github.com/ctr26/bioimage_embed


- Seamless loading of microscopy datasets, compatible with the BioImage Data Resource and Cell Image Library.
- Built-in preprocessing functions to ensure your images are primed for encoding.
- Visual tools to dive deep into the encoding and decoding processes of your autoencoders.
# Shape-Embed

---
This project attempts to using modern auto-encoding CNNs to access the latent shape space of a given dataset.
We demonstrate this on microscopy images of nuclei and C. Elegans (worms).
The project includes some sensible tricks such as including symmetry $\min|M^T - M|_2^2$ and $\min|diag(M)|$ constraints to help the model learn that it's using distance matrices.

## Installation
## How it works

To get started with bioimage_embed, you can install it directly via pip or from the GitHub repository.
- Take image masks (white on black)
- Find their contour (thx [scikit image]((https://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.find_contours)))
- Resample the contour to a standard length
- Create euclidean distance matrix
- Feed matrix as image into VAE
- Train model on distance matrix
- Opt. Convert distance matrix back to mask using MultiDimensionalScaling

### From PyPI:
Potential uses for this projects are:

```bash
pip install bioimage_embed
```

### From GitHub:

```bash
pip install git+https://github.com/ctr26/bioimage_embed
```

---
- Synthetic shape generation for dataset augmentation
- Shape-based phenotyping in the latent space

## Usage

### 1. Basic Installation:

```bash
pip install -e .
```

### 2. Command Line Interface (CLI):

To get a list of all commands and functions:

```bash
bioimage_embed --help
```

OR

```bash
bie --help
```

### 3. Fetching Data:

This utility makes it simple to fetch the necessary datasets:

```bash
make download.data
```

### 4. Developer Installation:
### Get data

For those intending to contribute or looking for a deeper dive into the codebase, we use `poetry` to manage our dependencies and virtual environments:
make download.data

```bash
poetry env use python
poetry install
poetry shell
```
If you don't have a Kaggle account you must create one and then follow the next steps:
1. Install the Kaggle API package so you can download the data from the Makefile you have all the information in their [Github repository](https://github.com/Kaggle/kaggle-api).
2. To use the Kaggle API you need also to create an API token.
You can found how to do it in their [documentation](https://github.com/Kaggle/kaggle-api#api-credentials)
4. After that you will need to add your user and key in a file called `kaggle.json` in this location in your home directory `chmod 600 ~/.kaggle/kaggle.json`
5. Don't forget to accept the conditions for the "2018 Data Science Bowl" on the Kaggle website.
Otherwise you would not be able to pull this data from the command line.

---
### Install

## Support & Contribution
poetry install

For any issues, please refer to our [issues page](https://github.com/ctr26/bioimage_embed/issues). Contributions are more than welcome! Please submit pull requests to the master branch.
and or:

---
pip install -e .

## License
### Run

bioimage_embed is licensed under the MIT License. Please refer to the [LICENSE](https://github.com/ctr26/bioimage_embed/LICENSE) for more details.
python train.py

---
### TODO

Happy Embedding! 🧬🔬
- Scale invariant distance matrix encoding (scale by matrix norm)
- Find better sampling of contour, e.g. using Delaunay triangulation?

0 comments on commit d181b05

Please sign in to comment.