{"id":22674945,"url":"https://github.com/dineshpinto/ml-droplet-recognition","last_synced_at":"2026-04-20T13:06:08.609Z","repository":{"id":124331237,"uuid":"485337767","full_name":"dineshpinto/ml-droplet-recognition","owner":"dineshpinto","description":"Neural network for micro-fluidic droplet LLPS recognition","archived":false,"fork":false,"pushed_at":"2022-07-06T10:32:53.000Z","size":4236,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T01:56:37.042Z","etag":null,"topics":["biology","deep-learning","keras","machine-learning","neural-network","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dineshpinto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-25T11:12:09.000Z","updated_at":"2023-07-15T22:12:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8f9a8cd-b3bd-44c5-9aae-89322efe830f","html_url":"https://github.com/dineshpinto/ml-droplet-recognition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dineshpinto/ml-droplet-recognition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dineshpinto%2Fml-droplet-recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dineshpinto%2Fml-droplet-recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dineshpinto%2Fml-droplet-recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dineshpinto%2Fml-droplet-recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dineshpinto","download_url":"https://codeload.github.com/dineshpinto/ml-droplet-recognition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dineshpinto%2Fml-droplet-recognition/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32048450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biology","deep-learning","keras","machine-learning","neural-network","tensorflow"],"created_at":"2024-12-09T17:19:28.983Z","updated_at":"2026-04-20T13:06:08.603Z","avatar_url":"https://github.com/dineshpinto.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Droplet Detection with Neural Networks\n\nUse a Convolutional Neural Network built in TensorFlow and Keras to detect a droplet in an experimental data set.\n\n## Test Data\n\nThe neural net consists of 4 layers, and for testing data shows reasonable results as shown below:\n\n![neural_net_results](results/test_data_result.png)\n\n## Experimental Data\n\nThe goal is to apply it to a biological sample and detect droplet formation. The droplet as imaged by a microscope\nlooks like:\n\n\u003cimg src=\"results/real_data_raw.png\" width=\"327\" height=\"250\" alt=\"raw_image\"\u003e\n\nThe model is trained on a subset of real data. The trained model is then used to find the droplet in the experimental\nimages.\nAn example of this is shown below:\n\n![processed_droplet](results/real_data_result.jpg)\n\n**Note:** All biological droplet data is sourced from [@cfsb618](https://github.com/cfsb618)\n\n## Model\n\n![keras_model](results/model.png)\n\n## Installation\n\n1. Create the conda environment from file (where `xx` is ether `win10` or `macm1`)\n\n```shell\nconda env create --file conda-env-xx.yml\n```\n\n3. Activate environment\n\n```shell\nconda activate ml_droplet\n```\n\n4. Add environment to Jupyter kernel\n\n```shell\npython -m ipykernel install --user --name=ml_droplet\n```\n\n### Performance\n\nFor optimal performance use a CUDA compatible NVIDIA GPU with the cuDNN libraries. The training times are around 3\norders of magnitude shorter.\nA guide on how to do this is given in the [Tensorflow docs](https://www.tensorflow.org/install/gpu).\n\nOn Apple Silicon, use the `tensorflow-metal` plugin. A guide on how to do this is given in\nthe [Apple developer docs](https://developer.apple.com/metal/tensorflow-plugin/).\n\n## Usage\n\n1. Place your training data in `training_data/` and the corresponding droplet labels in `droplet_labels.py`\n2. Train the model\n\n```shell\npython neural_network_training.py\n```\n\n4. This will train the neural network model and save the resulting model in `models/droplet_detection_model`\n5. Test the model by running an automated test set\n\n```shell\npython plot_results.py\n``` \n\nOR manually using the JupyterLab Notebook\n\n```shell \njupyter lab DropletDetectionTesting.ipynb\n```\n\n## TODO\n\n- [x] Add automated hyperparameter optimization.\n- [ ] Add droplet feature detection, such as detecting the point of phase separation\n- [ ] Add random sampling for training and testing data (example code below)\n\n### Export conda environment\n\n```shell\nconda env export --no-builds | grep -v \"^prefix: \" \u003e conda-env.yml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdineshpinto%2Fml-droplet-recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdineshpinto%2Fml-droplet-recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdineshpinto%2Fml-droplet-recognition/lists"}