Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
eecd48d
Merge a8c66ebb98565c20f576bbf5b2fda4c8a57eec44 into 8a58cc19e838d683b…
BenjaminMidtvedt Jul 26, 2022
51c87f1
chore: autopublish 2022-07-26T13:54:44Z
github-actions[bot] Jul 26, 2022
b30c265
Remove create-badges job
BenjaminMidtvedt Jul 26, 2022
085b0e5
Delete test.py
BenjaminMidtvedt Jul 26, 2022
74b37b4
Add multi-head masked attention
JesusPinedaC Jul 26, 2022
b4debf5
Update multi-head gated attention to match parent layer
JesusPinedaC Jul 26, 2022
3ecb423
Update documentation
JesusPinedaC Jul 26, 2022
bbf7f4b
Test multi-head masked attention
JesusPinedaC Jul 27, 2022
5df728a
allow gated attention layers to use bias
JesusPinedaC Jul 27, 2022
337152e
test bias in gated attention layers
JesusPinedaC Jul 27, 2022
4eb3e10
set return_attention_weights to False to avoid multi-outputs
JesusPinedaC Jul 27, 2022
2affe63
reformat gnns/layers.py
JesusPinedaC Jul 29, 2022
26d064c
Update layers.py
JesusPinedaC Jul 29, 2022
c65f49d
Update test_layers.py
JesusPinedaC Jul 29, 2022
2ca0590
Update models.py
JesusPinedaC Jul 30, 2022
1d99b6b
Update test_models.py
JesusPinedaC Jul 30, 2022
49cf7ed
Update test_models.py
JesusPinedaC Jul 30, 2022
f455fa1
Merge pull request #129 from softmatterlab/jp/rev-MAGIK
BenjaminMidtvedt Aug 1, 2022
e73d5ed
Fix indexing problems related to tf.gather
JesusPinedaC Aug 2, 2022
71e67ff
Merge pull request #130 from softmatterlab/jp/fix-idx-gather
BenjaminMidtvedt Aug 3, 2022
790e8e2
Allow multi-inputs in ContinuousGenerator
JesusPinedaC Aug 15, 2022
d4e17c1
Fix bad conversion to integer
BenjaminMidtvedt Aug 22, 2022
ad2a95e
version bump
BenjaminMidtvedt Aug 22, 2022
fffe6b6
Merge pull request #131 from softmatterlab/jp/multi-input-generator
BenjaminMidtvedt Aug 22, 2022
af29362
Fix phase correction at focus and offset calculation
BenjaminMidtvedt Aug 26, 2022
d055d1a
Fix phase correction in propagation
BenjaminMidtvedt Aug 26, 2022
30d1489
Merge pull request #134 from softmatterlab/bm/fix-mie-phase
BenjaminMidtvedt Aug 26, 2022
277db0b
Fix mie phase out of foucs
BenjaminMidtvedt Sep 1, 2022
a6f4ba0
Fix mie phase out of foucs
BenjaminMidtvedt Sep 9, 2022
39e4c6d
Merge branch 'develop' of https://github.com/softmatterlab/DeepTrack-…
BenjaminMidtvedt Sep 9, 2022
4806835
Update README.md
giovannivolpe Sep 22, 2022
ff2aca1
Bm/version 1.4.0 (#137)
giovannivolpe Oct 4, 2022
d68fca4
Merge branch 'develop'
BenjaminMidtvedt Oct 4, 2022
5aa410b
Add tensorflow datasets to the list of dependencies.
BenjaminMidtvedt Oct 6, 2022
bfb0e03
Read requirements.txt into setup.py
BenjaminMidtvedt Oct 6, 2022
ecc509f
remove sphinx from build
BenjaminMidtvedt Oct 6, 2022
1886c67
remove create badges
BenjaminMidtvedt Oct 6, 2022
c0accf1
Create CITATION.cff
giovannivolpe Oct 24, 2022
eb04f0c
Create .zenodo.json
giovannivolpe Oct 24, 2022
0be3ef9
Update transformer models
JesusPinedaC Oct 26, 2022
d355352
Update pint_definition.py
JesusPinedaC Oct 26, 2022
6ea9326
Update requirements.txt
JesusPinedaC Oct 26, 2022
b079b69
Merge pull request #140 from softmatterlab/bm/tfd
BenjaminMidtvedt Oct 26, 2022
79da3c8
Merge pull request #145 from softmatterlab/jp/transformers
BenjaminMidtvedt Oct 26, 2022
6ef979d
create TimeDistributed CNN
JesusPinedaC Oct 28, 2022
64667cc
small fixes to lodestar
BenjaminMidtvedt Oct 30, 2022
dedcaa7
Merge pull request #146 from softmatterlab/jp/time-distributed
BenjaminMidtvedt Oct 30, 2022
af0babc
Merge pull request #147 from softmatterlab/bm/add-holo-data
BenjaminMidtvedt Oct 31, 2022
54df12a
Merge branch 'master' into develop
BenjaminMidtvedt Nov 1, 2022
04acc62
Update layers.py
JesusPinedaC Nov 8, 2022
19bd1a3
Update test_layers.py
JesusPinedaC Nov 8, 2022
9ab12a5
remove direct getter of properties
BenjaminMidtvedt Nov 9, 2022
f0d0432
Update scatterers.py
HarshithBachimanchi Nov 15, 2022
d6c4a22
Update scatterers.py
HarshithBachimanchi Nov 16, 2022
b70d9d6
mie phase fix
BenjaminMidtvedt Nov 17, 2022
0f2a041
Merge pull request #150 from softmatterlab/bm/fix-repeat-miesphere
BenjaminMidtvedt Nov 21, 2022
dad31d3
Merge branch 'develop' into hb/inline
BenjaminMidtvedt Nov 21, 2022
d34ba6a
Merge pull request #151 from HarshithBachimanchi/hb/inline
BenjaminMidtvedt Nov 21, 2022
21c9272
removed pydeepimagej from deps
BenjaminMidtvedt Nov 25, 2022
10fc4e4
Change loss input order of CGAN and PCGAN
GideonJagen Nov 28, 2022
75d13ea
Create dmdataset (dataset for graph-level regression tasks)
JesusPinedaC Nov 30, 2022
7c67ea8
Update gnns/__init__.py
JesusPinedaC Nov 30, 2022
1ca8651
Merge pull request #159 from softmatterlab/jp/more-gnns-datasets
BenjaminMidtvedt Nov 30, 2022
00028ad
Merge pull request #149 from softmatterlab/jp/gnn-gru-fix
BenjaminMidtvedt Nov 30, 2022
f93cfed
Merge pull request #157 from GideonJagen/fix-cgan-loss
BenjaminMidtvedt Nov 30, 2022
08cce3c
Add detection_linking_hela dataset
JesusPinedaC Dec 1, 2022
8e74b54
Merge pull request #160 from softmatterlab/jp/dic_hela_gnn_dataset
JesusPinedaC Dec 3, 2022
8218e77
Update dmdataset.py
JesusPinedaC Dec 5, 2022
54c409d
Create the regression_diffusion_landscape
JesusPinedaC Dec 5, 2022
7e082f0
Update scatterers.py
HarshithBachimanchi Dec 6, 2022
6c3c071
Update test_scatterers.py
HarshithBachimanchi Dec 6, 2022
e94c186
Update augmentations.py
JesusPinedaC Dec 6, 2022
50c6504
Update test_scatterers.py
HarshithBachimanchi Dec 6, 2022
48ad113
Update test_scatterers.py
HarshithBachimanchi Dec 6, 2022
cacf812
Merge pull request #162 from softmatterlab/jp/node-gnn-dataset
BenjaminMidtvedt Dec 6, 2022
8c314e8
Merge pull request #161 from HarshithBachimanchi/hb/inline
BenjaminMidtvedt Dec 6, 2022
6d885bd
Create endothelial_vs dataset
JesusPinedaC Dec 7, 2022
c7af8a8
Update layers.py
JesusPinedaC Dec 7, 2022
8563438
Update utils.py
JesusPinedaC Dec 8, 2022
093b4c3
Merge pull request #163 from softmatterlab/jp/vs
BenjaminMidtvedt Dec 8, 2022
a28097d
Merge pull request #155 from softmatterlab/bm/remove-pydeepimagej
BenjaminMidtvedt Dec 8, 2022
227db5f
Update docs link
BenjaminMidtvedt Dec 12, 2022
393e0e7
Update README.md
BenjaminMidtvedt Dec 12, 2022
a14400c
version bump
Dec 13, 2022
f32936c
version bump
Dec 13, 2022
6944ec4
Merge branch 'develop' of https://github.com/softmatterlab/DeepTrack2…
Dec 13, 2022
5d6c5a8
Update README.md
BenjaminMidtvedt Dec 13, 2022
25ba82b
Merge branch 'master' into develop
BenjaminMidtvedt Dec 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center">
<img width="350" src=https://github.com/softmatterlab/DeepTrack-2.0/blob/develop/assets/logo.png?raw=true>
<img width="350" src=https://github.com/softmatterlab/DeepTrack2/blob/develop/assets/logo.png?raw=true>
</p>

<h3 align="center">A comprehensive deep learning framework for digital microscopy.</h3>
<p align="center">
<a href="/LICENSE" alt="licence"><img src="https://img.shields.io/github/license/softmatterlab/DeepTrack-2.0"></a>
<a href="https://badge.fury.io/py/deeptrack"><img src="https://badge.fury.io/py/deeptrack.svg" alt="PyPI version"></a>
<a href="https://softmatterlab.github.io/DeepTrack-2.0/deeptrack.html"><img src="https://img.shields.io/badge/docs-passing-green" alt="PyPI version"></a>
<a href="https://softmatterlab.github.io/DeepTrack2/deeptrack.html"><img src="https://img.shields.io/badge/docs-passing-green" alt="PyPI version"></a>
<a href="https://badge.fury.io/py/deeptrack"><img src="https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue" alt="Python version"></a>
<a href="https://doi.org/10.1063/5.0034891" alt="DOI">
<img src="https://img.shields.io/badge/DOI-10.1063%2F5.0034891-blue">
Expand Down Expand Up @@ -54,8 +54,8 @@ DeepTrack is a general purpose deep learning framework for microscopy, meaning y
<br/>
<a href="https://colab.research.google.com/github/softmatterlab/DeepTrack-2.0/blob/master/examples/paper-examples/2-single_particle_tracking.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg"> Training a CNN-based single particle tracker using simulated data </a>
<br/>
<a href="https://doi.org/10.48550/arXiv.2202.13546" alt="DOI lodestar">
<img src="https://img.shields.io/badge/DOI-10.48550%2FarXiv.2202.13546-blue">
<a href="https://doi.org/10.1038/s41467-022-35004-y" alt="DOI lodestar">
<img src="https://img.shields.io/badge/DOI-10.1038%2Fs41467--022--35004--y-blue">
</a>
<a href="https://colab.research.google.com/github/softmatterlab/DeepTrack-2.0/blob/master/examples/LodeSTAR/02.%20tracking_particles_of_various_shapes.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg"> Unsupervised training of a single particle tracker using LodeSTAR </a>

Expand All @@ -67,8 +67,8 @@ DeepTrack is a general purpose deep learning framework for microscopy, meaning y
<p align="left">
<img width="600" src=/assets/MPT-packed.gif?raw=true>
<br/>
<a href="https://doi.org/10.48550/arXiv.2202.13546" alt="DOI lodestar">
<img src="https://img.shields.io/badge/DOI-10.48550%2FarXiv.2202.13546-blue">
<a href="https://doi.org/10.1038/s41467-022-35004-y" alt="DOI lodestar">
<img src="https://img.shields.io/badge/DOI-10.1038%2Fs41467--022--35004--y-blue">
</a> <a href="https://colab.research.google.com/github/softmatterlab/DeepTrack-2.0/blob/master/examples/LodeSTAR/03.track_BF-C2DL-HSC.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg"> Training LodeSTAR to detect multiple cells from a single image </a>
<br/>
<a href="https://colab.research.google.com/github/softmatterlab/DeepTrack-2.0/blob/master/examples/paper-examples/4-multi-molecule-tracking.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg"> Training a UNet-based multi-particle tracker using simulated data </a>
Expand Down Expand Up @@ -144,6 +144,13 @@ https://doi.org/10.1063/5.0034891

See also:

<https://www.nature.com/articles/s41467-022-35004-y>:
```
Midtvedt, B., Pineda, J., Skärberg, F. et al.
"Single-shot self-supervised object detection in microscopy."
Nat Commun 13, 7492 (2022).
```

<https://arxiv.org/abs/2202.06355>:
```
Jesús Pineda, Benjamin Midtvedt, Harshith Bachimanchi, Sergio Noé, Daniel Midtvedt, Giovanni Volpe,1 and Carlo Manzo
Expand Down
4 changes: 4 additions & 0 deletions deeptrack/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
regression_holography_nanoparticles,
segmentation_fluorescence_u2os,
detection_holography_nanoparticles,
detection_linking_hela,
dmdataset,
regression_diffusion_landscape,
endothelial_vs,
)
3 changes: 3 additions & 0 deletions deeptrack/datasets/detection_linking_hela/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""detection_linking_hela dataset."""

from .detection_linking_hela import DetectionLinkingHela
3 changes: 3 additions & 0 deletions deeptrack/datasets/detection_linking_hela/checksums.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TODO(detection_linking_hela): If your dataset downloads files, then the checksums
# will be automatically added here when running
# `tfds build --register_checksums`.
121 changes: 121 additions & 0 deletions deeptrack/datasets/detection_linking_hela/detection_linking_hela.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import tensorflow as tf
import tensorflow_datasets as tfds

import numpy as np
import pandas as pd

_DESCRIPTION = """
This dataset includes tracking data from DIC-C2DH-HELA (provided by the sixth edition of the Cell Tracking Challenge).
It consists of two dataframes: ``nodes`` and ``parenthood``. ``nodes`` contains information about the individual
cells, while "parenthood" includes information on the lineage of the cells.
"""

_CITATION = """
@article{pineda2022geometric,
title={Geometric deep learning reveals the spatiotemporal fingerprint of microscopic motion},
author={Pineda, Jes{\'u}s and Midtvedt, Benjamin and Bachimanchi, Harshith and No{\'e}, Sergio and Midtvedt, Daniel and Volpe, Giovanni and Manzo, Carlo},
journal={arXiv preprint arXiv:2202.06355},
year={2022}
}
"""


class DetectionLinkingHela(tfds.core.GeneratorBasedBuilder):
"""DatasetBuilder for detection_linking_Hela dataset."""

VERSION = tfds.core.Version("1.0.0")
RELEASE_NOTES = {
"1.0.0": "Initial release.",
}

def _info(self) -> tfds.core.DatasetInfo:
"""Returns the dataset metadata."""
NODE_FEATURES = self.get_node_features()
return tfds.core.DatasetInfo(
builder=self,
description=_DESCRIPTION,
features=tfds.features.FeaturesDict(
{
"nodes": tfds.features.FeaturesDict(
{
**{
key: tfds.features.Tensor(
shape=(None,), dtype=NODE_FEATURES[key]
)
for key in NODE_FEATURES.keys()
},
}
),
"parenthood": tfds.features.FeaturesDict(
{
"child": tfds.features.Tensor(
shape=(None,), dtype=tf.int32
),
"parent": tfds.features.Tensor(
shape=(None,), dtype=tf.int32
),
}
),
"images": tfds.features.Tensor(
shape=(84, 512, 512, 1), dtype=tf.float64
),
"masks": tfds.features.Tensor(
shape=(84, 512, 512, 1), dtype=tf.float64
),
}
),
supervised_keys=None,
homepage="https://dataset-homepage/",
citation=_CITATION,
)

def _split_generators(self, dl_manager: tfds.download.DownloadManager):
"""Returns SplitGenerators."""
# Downloads the data and defines the splits
path = dl_manager.download_and_extract(
"https://drive.google.com/u/1/uc?id=1itHz4KmrUqDCKpGNyHUiHE4AFhwiJ5XR&export=download"
)

# Returns the Dict[split names, Iterator[Key, Example]]
return {
"train": self._generate_examples(
path / "detection_linking_hela", "train"
),
"test": self._generate_examples(
path / "detection_linking_hela", "test"
),
}

def _generate_examples(self, path, split):
"""Yields examples."""

# Load data
nodes, parenthood, images, masks = (
pd.read_csv(path / split / "nodesdf.csv"),
pd.read_csv(path / split / "parenthood.csv"),
np.load(path / split / "images.npy"),
np.load(path / split / "masks.npy"),
)

yield "_", {
"nodes": {**nodes.to_dict("list")},
"parenthood": {**parenthood.to_dict("list")},
"images": images * 1.0,
"masks": masks * 1.0,
}

def get_node_features(self):
return {
"frame": tf.int32,
"label": tf.int32,
"centroid-0": tf.float32,
"centroid-1": tf.float32,
"area": tf.float32,
"mean_intensity": tf.float32,
"perimeter": tf.float32,
"eccentricity": tf.float32,
"solidity": tf.float32,
"set": tf.float32,
"parent": tf.int32,
"solution": tf.float32,
}
3 changes: 3 additions & 0 deletions deeptrack/datasets/dmdataset/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""dmdataset dataset."""

from .dmdataset import Dmdataset
3 changes: 3 additions & 0 deletions deeptrack/datasets/dmdataset/checksums.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TODO(dmdataset): If your dataset downloads files, then the checksums
# will be automatically added here when running
# `tfds build --register_checksums`.
135 changes: 135 additions & 0 deletions deeptrack/datasets/dmdataset/dmdataset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
"""dmdataset dataset."""

import tensorflow_datasets as tfds
import tensorflow as tf

import os
import scipy

_DESCRIPTION = """
"""

_CITATION = """
"""


class Dmdataset(tfds.core.GeneratorBasedBuilder):
"""DatasetBuilder for dmdataset dataset."""

VERSION = tfds.core.Version("1.0.0")
RELEASE_NOTES = {
"1.0.0": "Initial release.",
}

def _info(self) -> tfds.core.DatasetInfo:
"""Returns the dataset metadata."""

NODE_FEATURES = self.get_features()

return tfds.core.DatasetInfo(
builder=self,
description=_DESCRIPTION,
features=tfds.features.FeaturesDict(
{
"graph": tfds.features.FeaturesDict(
{
**{
key: tfds.features.Tensor(
shape=feature[0],
dtype=feature[1],
)
for key, feature in NODE_FEATURES[
"graph"
].items()
},
}
),
"labels": tfds.features.FeaturesDict(
{
**{
key: tfds.features.Tensor(
shape=feature[0],
dtype=feature[1],
)
for key, feature in NODE_FEATURES[
"labels"
].items()
},
}
),
"sets": tfds.features.FeaturesDict(
{
**{
key: tfds.features.Tensor(
shape=feature[0],
dtype=feature[1],
)
for key, feature in NODE_FEATURES[
"sets"
].items()
},
}
),
}
),
supervised_keys=None,
homepage="https://dataset-homepage/",
citation=_CITATION,
)

def _split_generators(self, dl_manager: tfds.download.DownloadManager):
"""Returns SplitGenerators."""
path = dl_manager.download_and_extract(
"https://drive.google.com/u/1/uc?id=19vplN2lbKo4KAmv4NRU2qr3NSlzxFzrx&export=download"
)

return {
"train": self._generate_examples(
os.path.join(path, "dmdataset", "training")
),
"test": self._generate_examples(
os.path.join(path, "dmdataset", "validation")
),
}

def _generate_examples(self, path):
"""Yields examples."""
data = [{}, {}, {}]
for i, subdict in enumerate(self.get_features().values()):
files = (*subdict.keys(),)

for file in files:
data_elem = scipy.sparse.load_npz(
os.path.join(path, file + ".npz")
).toarray()
data_elem = (
data_elem[0] if data_elem.shape[0] == 1 else data_elem
)

data[i][file] = data_elem

yield "key", {
"graph": data[0],
"labels": data[1],
"sets": data[2],
}

def get_features(self):
return {
"graph": {
"frame": [(None, 1), tf.float64],
"node_features": [(None, 3), tf.float64],
"edge_features": [(None, 1), tf.float64],
"edge_indices": [(None, 2), tf.int64],
"edge_dropouts": [(None, 2), tf.float64],
},
"labels": {
"node_labels": [(None,), tf.float64],
"edge_labels": [(None,), tf.float64],
"global_labels": [(None, 3), tf.float64],
},
"sets": {
"node_sets": [(None, 2), tf.int64],
"edge_sets": [(None, 3), tf.int64],
},
}
3 changes: 3 additions & 0 deletions deeptrack/datasets/endothelial_vs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""endothelial_vs dataset."""

from .endothelial_vs import EndothelialVs
1 change: 1 addition & 0 deletions deeptrack/datasets/endothelial_vs/checksums.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://drive.google.com/u/1/uc?id=10gqn0MwuxgyfJVWDZ6a8xduQuGAke4K3&export=download 878669723 7059c1e1245ed9127f207d41efc7d53187d8e4c46d75bea8c90dce630cabe6b4 LiveDeadDataset.zip
Loading