Skip to content

Conversation

BenjaminMidtvedt
Copy link
Collaborator

@BenjaminMidtvedt BenjaminMidtvedt commented Aug 3, 2021

Implements a recursive way of getting relevant citations for any deeptrack object. To add ones own citation, the following syntax is suggested:

class MyDeepTrackObject(ParentDeepTrackObject):
    citations = {*ParentDeepTrackObject.citations, my_citation}
    ...

Where ParentDeepTrackObject is any deeptrack object (such as Feature or KerasModel).

For function-wrapped initialisers (How many network architectures are implemented currently), we provide the decorator @with_citation. Example is provided for the unet:

@with_citation(unet_bibtex)
@as_KerasModel
def UNet():
    ...

Currently, the bibtex is not parsed in any way, and no validation of the correctness of the grammar is provided. I propose that such additions are to be implemented in the future if deemed relevant.

To recursively retrieve all citations of a deeptrack object (and its dependencies), we provide the utility method obj.get_citations(). This returns a set of unique citations that can be iterated over and printed:

for citation in some_pipeline.get_citations():
    print(citation)

@giovannivolpe giovannivolpe merged commit 63c9a61 into v2.1 Aug 3, 2021
@giovannivolpe giovannivolpe deleted the bm/get_citation branch August 3, 2021 14:37
giovannivolpe added a commit that referenced this pull request Mar 1, 2022
* Feature: ComplexGaussian

* Add distributed to base class

* More robust index handling

* Correctly broadcast arithmetic operators

* lower case function

* convert to new syntax

* Add dependencies

* introduce benchmarking

* Add config object

* Allow init with cupy

* hide _update methods

* Benchmark on gpu vs cpu

* Implement mie on gpu

* Implement brightfield on gpu

* Bigfix Clip

* Coerce inputs before method to ensure all is on same devicc

* Allow gpu

* Implement conditional features

* Enable memory growth

* More tests

* format input after properties

* Merge CappedContinuousGenerator into ContinuousGenerator

* Update benchmarks using groups

* Include banchmark command

* Significant speedup by not copying array

* Enable benchmark

* Specialcase creating Image with another Image

* Don't return depadding

* Minor bugfixes

* Request pixel radius

* Support adding preprocessing to model

* Implement autotracker

* Implement autotracker

* base multiparticle autotracking implementation

* Correcting loss and data generation

* Make labels array before  indexing

* Include new models implementation

* Defining center in terms of center of mass

* Single particle tracking tests

* Single particle tests

* Addded rotational consistency loss

* Allow definition of number of symmetries

* Sorting imports

* Added documentation

* Delete legacy examples

* Get z directly

* Linting improvements

* Autotrack multiply by symmetries

* Allow different modes

* Implement rotational consistency

* alpha release version

* Orientation training notebook

* Fixing positioning of complex images

* Add rnn

* remove cappedcontinuousgenerator

* removed vscode settings

* Remove logging

* allow image of tuples

* Made fluorescence compatible with gpu

* Fetch z-position of fields via get_property

* Update README.md

* add cgan model

* add pcgan model

* add documentation for cgan

* add documentation for pcgan and evaluate the perceptual model definition

* all layers in perceptual discriminator are now frozen

* update documentation

* Check for nans in pupil

* Fixed bug where array is not converted to cpu

* Don't correct prediction

* Added OneOf and OneOfDict

* Add resolve arguments to property-list

* Facilitate external control of key

* Initialize before adding deps

* OneOf should not be distributed

* Ensure key is propagated to properties

* correctly return modified properties

* Add unit tests for OneOf and OneOfDict

* Correct error with array function

* Ensure code runs without cupy

* Add sizing and notebooks

* Implement rudimentary citation system

* elementwise test fix

* Remove center_crop

* Implement rudimentary citation system (#68)

* citation as static property

* Fix convolutional loss

* Fix brughtfield pupil

* Reduced memory allocation in brightfield

* Remove unused context definition

* Load copy of default unit definitions without Printing group

* Use with-statement to set context

* Change conversions

* Create default definition file

* Set context outside conversion table

* remove print

* Implemented tests for base models

* Update autotracking

* allow registered configs

* sizing

* Implement pytorch style generator

* Patch weird interaction with np.ma.ravel

* Example showcasing how to usse pytorch with deeptrack

* tutorial for experimental data

* optmized loss calculation

* Reformat model structure

* version bump

* Fix shape prediction shape bug

* Better saving/loading

* better indexing

* latest

* Allow generator kwargs

* Correct generator output

* Correct generator output

* Run notebook

* Fix Average

* Optimized autotracker speed

* Implement equivariances

* update example

* typo fix

* Check for data size first

* Wait at start of on_epoch_end

* Invalidate entire DataList

* un-name unused kwargs

* Fix interaction between repeat and sequence

* version bump

* Set default z-offset unit to meters

* Update autotracking example

* restructure examples

* Delete autotrack-examples directory

Move example

* Update python-app.yml

* Remove plotting

* rerun notebooks

* chore: make docs

* add dep to pint

* allow user-defined normalization layers

* Avoid optional dependencies

* avoid optional dependencies and improve documentation

* Update layers.py

* Update test_layers.py

* Update layers.py

* Vastly simplified logic in code

* Use weakref to avoid dependency explosion

* rename replicate_index to _ID

* linting improvements

* Add multi-head attention layers

* Update test_layers.py

* Allow use of unit for resolution

* remove test code

* 11.5 pypi fix

* Update layers.py

* Update layers.py

* Create gnns/layers.py

* Update test_layers.py

* Update test_layers.py

* Update python-app.yml

* Update python-app.yml

* Update test_layers.py

* Update python-app.yml

* Update python-app.yml

* Update layers.py

* Update layers.py

* v2.0.11.3 (#61) (#92)

* Fixed bug: Edge case of incorrect positioning of scatterer.

Co-authored-by: BenjaminMidtvedt <41636530+BenjaminMidtvedt@users.noreply.github.com>

* Update gans

* Update gnn layers and fix bugs related to non-accessible trainable parameters

* Move layer functions to utils.py

* Update test_layers.py

* Update utils.py

* Add reuse and fix off by one error in flips

* Cap poisson to avoid lam too large error

* Make generator not stall on out_of_data

* move lodestar examples

* correctly import gans

* fix bug with reuse with lists

* Fix LoadImage extra dimensions

* LoadImage and Poisson bug fixes

* update examples to v2.1

* Accidental import of value

* rename to lodestar

* rename folder

* rename folder

* rename to lodestar

* ignore datasets

* failed run

* better run

* version bump

* don't pass batch_size to model.fit

* improve plotting

* Create embeddings.py

* Add TransformerEncoder

* Update test_layers.py

* Update layers.py

* Create __init__.py

* Update __init__.py

* Update layers.py

* Create gnns/models

* Update layers.py

* Update __init__.py

* Update layers.py

* fix polarization calculation

* Delete 04. building_complex_pipelines copy.ipynb

* Delete 05. making_timeseries.ipynb

* Remove legacy functions

* Update README.md

* fix minor bug

* Update README.md

* Update README.md

* Update README.md

* Update logo.png

* Update README.md

* Update README.md

* Update generators.py

Make generator compatible with 2.0 syntax

Co-authored-by: Benjamin Midtvedt <benmid@student.chalmers.se>
Co-authored-by: BenjaminMidtvedt <41636530+BenjaminMidtvedt@users.noreply.github.com>
Co-authored-by: JesusPinedaC <jesus.pineda@physics.gu.se>
Co-authored-by: Jesús Pineda <36273229+JesusPinedaC@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants