diff --git a/CITATION.bib b/CITATION.bib new file mode 100644 index 0000000..5fe4dbe --- /dev/null +++ b/CITATION.bib @@ -0,0 +1,9 @@ +@software{pidgan:2024abc, + author = "Lucio Anderlini and Matteo Barbetti", + title = "{PIDGAN: GAN-based models to flash-simulate the LHCb PID detectors}", + version = "v0.2.0", + url = "https://github.com/mbarbetti/pidgan", + doi = "10.5281/zenodo.10463728", + publisher = "Zenodo", + year = "2024", +} \ No newline at end of file diff --git a/README.md b/README.md index c468405..c3ebc35 100644 --- a/README.md +++ b/README.md @@ -34,40 +34,123 @@ [![Docker - Version](https://img.shields.io/docker/v/mbarbetti/pidgan?label=docker)](https://hub.docker.com/r/mbarbetti/pidgan) --> -### Generative Adversarial Networks +### What is PIDGAN? + +PIDGAN is a Python package built upon TensorFlow 2 to provide ready-to-use implementations for several GAN algorithms (listed in [this table](#generative-adversarial-networks)). The package was originally designed to simplify the training and optimization of GAN-based models for the _Particle Identification_ (PID) system of the LHCb experiment. Today, PIDGAN is a versatile package that can be employed in a wide range of _High Energy Physics_ (HEP) applications and, in general, whenever one has anything to do with tabular data and aims to learn the conditional probability distributions of a set of target features. This package is one of the building blocks to define a _Flash Simulation_ framework of the LHCb experiment [1]. + +#### PIDGAN is (almost) all you need (for flash-simulation) + +Standard techniques for simulations consume tons of CPU hours in reproducing _all_ the radiation-matter interactions occurring within a HEP detector when traversed by primary and secondary particles. Directly transforming generated particles into analysis-level objects allows Flash Simulation strategies to speed up significantly the simulation production, up to x1000 [1]. Such transformations can be defined by using _Generative Adversarial Networks_ (GAN) [[2][gan]] trained to take into account the kinematics of the traversing particles and the detection conditions (e.g., magnet polarity, occupancy). + +GANs rely on the simultaneous (adversarial) training of two neural networks called _generator_ and _discriminator_, whose competition ends once reached the [Nash equilibrium](https://en.wikipedia.org/wiki/Nash_equilibrium). At this point, the generator can be used as simulator to generate new data according to the conditional probability distributions learned during the training [[3][cgan]]. By relying on the TensorFlow and Keras APIs, PIDGAN allows to define and train a GAN model with no more than 20 code lines. + +```python +from pidgan.players.generators import Generator +from pidgan.players.discriminators import Discriminator +from pidgan.algorithms import GAN + +x = ... # conditions +y = ... # targets + +G = Generator( + output_dim=y.shape[1], + latent_dim=64, + output_activation="linear", +) + +D = Discriminator( + output_dim=1, + output_activation="sigmoid", +) + +model = GAN(generator=G, discriminator=D) +model.compile( + metrics=["accuracy"], + generator_optimizer="rmsprop", + discriminator_optimizer="rmsprop", +) + +model.fit(x, y, batch_size=256, epochs=100) +``` + +### Installation guide + +#### First steps + +Before installing PIDGAN, we suggest preparing a fully operational TensorFlow installation by following the instructions described in the [dedicated guide](https://www.tensorflow.org/install). If your device is equipped with one of the NVIDIA GPU cards supported by TensorFlow (see [Hardware requirements](https://www.tensorflow.org/install/pip#hardware_requirements)), do not forget to verify the correct installation of the libraries for hardware acceleration by running: + +```bash +python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" +``` + +If the equipped GPU card is not included in the list printed by the previous command, your device and/or Python environment may be misconfigured. Please refer to [this table](https://www.tensorflow.org/install/source#gpu) for the correct configuration of CUDA Toolkit and cuDNN requested by the different TensorFlow versions. + +#### How to install + +PIDGAN has a minimal list of [requirements](https://github.com/mbarbetti/pidgan/blob/main/requirements/base.txt): + +- Python >=3.7, <3.13 +- TensorFlow >= 2.8, < 2.17 +- scikit-learn >= 1.0, < 1.6 +- NumPy < 2.0 +- Hopaas client (https://github.com/landerlini/hopaas_client) + +The easiest way to install PIDGAN is via `pip`: + +```bash +pip install pidgan +``` + +In addition, since `hopaas_client` is not available on [PyPI](https://pypi.org), you need to install it manually to unlock the complete set of PIDGAN functionalities: + +```bash +pip install git+https://github.com/landerlini/hopaas_client +``` + +#### Optional dependencies + +Standard HEP applications may need additional packages for data management, results visualization/validation, and model export. PIDGAN and any [additional requirements](https://github.com/mbarbetti/pidgan/blob/main/requirements/hep.txt) potentially useful in HEP can be installed via `pip` in one shot: + +```bash +pip install pidgan[hep] +``` + +### Models available + +#### Generative Adversarial Networks | Algorithms* | Source | Avail | Test | Lipschitz** | Refs | Tutorial | |:-----------:|:------:|:-----:|:----:|:-----------:|:----:|:--------:| -| GAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/GAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/GAN.py) | ✅ | ✅ | ❌ | [1][1], [8][8], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-GAN-LHCb_RICH.ipynb) | -| BceGAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/BceGAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/BceGAN.py) | ✅ | ✅ | ❌ | [2][2], [8][8], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-BceGAN-LHCb_RICH.ipynb) | -| LSGAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/LSGAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/LSGAN.py) | ✅ | ✅ | ❌ | [3][3], [8][8], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-LSGAN-LHCb_RICH.ipynb) | -| WGAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/WGAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/WGAN.py) | ✅ | ✅ | ✅ | [4][4], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-WGAN-LHCb_RICH.ipynb) | -| WGAN-GP | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/WGAN_GP.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/WGAN_GP.py) | ✅ | ✅ | ✅ | [5][5], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-WGAN_GP-LHCb_RICH.ipynb) | -| CramerGAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/CramerGAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/CramerGAN.py) | ✅ | ✅ | ✅ | [6][6], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-CramerGAN-LHCb_RICH.ipynb) | -| WGAN-ALP | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/WGAN_ALP.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/WGAN_ALP.py) | ✅ | ✅ | ✅ | [7][7], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-WGAN_ALP-LHCb_RICH.ipynb) | -| BceGAN-GP | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/BceGAN_GP.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/BceGAN_GP.py) | ✅ | ✅ | ✅ | [2][2], [5][5], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-BceGAN_GP-LHCb_RICH.ipynb) | -| BceGAN-ALP | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/BceGAN_ALP.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/BceGAN_ALP.py) | ✅ | ✅ | ✅ | [2][2], [7][7], [9][9] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-BceGAN_ALP-LHCb_RICH.ipynb) | - -*each GAN algorithm is designed to operate taking __conditions__ as input [[10][10]] +| GAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/GAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/GAN.py) | ✅ | ✅ | ❌ | [2][gan], [10][pre-wgan], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-GAN-LHCb_RICH.ipynb) | +| BceGAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/BceGAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/BceGAN.py) | ✅ | ✅ | ❌ | [4][dcgan], [10][pre-wgan], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-BceGAN-LHCb_RICH.ipynb) | +| LSGAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/LSGAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/LSGAN.py) | ✅ | ✅ | ❌ | [5][lsgan], [10][pre-wgan], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-LSGAN-LHCb_RICH.ipynb) | +| WGAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/WGAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/WGAN.py) | ✅ | ✅ | ✅ | [6][wgan], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-WGAN-LHCb_RICH.ipynb) | +| WGAN-GP | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/WGAN_GP.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/WGAN_GP.py) | ✅ | ✅ | ✅ | [7][wgan-gp], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-WGAN_GP-LHCb_RICH.ipynb) | +| CramerGAN | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/CramerGAN.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/CramerGAN.py) | ✅ | ✅ | ✅ | [8][cramer-gan], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-CramerGAN-LHCb_RICH.ipynb) | +| WGAN-ALP | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/WGAN_ALP.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/WGAN_ALP.py) | ✅ | ✅ | ✅ | [9][wgan-alp], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-WGAN_ALP-LHCb_RICH.ipynb) | +| BceGAN-GP | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/BceGAN_GP.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/BceGAN_GP.py) | ✅ | ✅ | ✅ | [4][dcgan], [7][wgan-gp], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-BceGAN_GP-LHCb_RICH.ipynb) | +| BceGAN-ALP | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k2/BceGAN_ALP.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/algorithms/k3/BceGAN_ALP.py) | ✅ | ✅ | ✅ | [4][dcgan], [9][wgan-alp], [11][gan-tricks] | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mbarbetti/pidgan-notebooks/blob/main/tutorial-BceGAN_ALP-LHCb_RICH.ipynb) | + +*each GAN algorithm is designed to operate taking __conditions__ as input [[3][cgan]] **the GAN training is regularized to ensure that the discriminator encodes a 1-Lipschitz function -### Generators +#### Generators | Players | Source | Avail | Test | Skip conn | Refs | |:-------:|:------:|:-----:|:----:|:---------:|:----:| -| Generator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/generators/k2/Generator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/generators/k3/Generator.py) | ✅ | ✅ | ❌ | [1][1], [10][10] | -| ResGenerator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/generators/k2/ResGenerator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/generators/k3/ResGenerator.py) | ✅ | ✅ | ✅ | [1][1], [10][10], [11][11] | +| Generator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/generators/k2/Generator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/generators/k3/Generator.py) | ✅ | ✅ | ❌ | [2][gan], [3][cgan] | +| ResGenerator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/generators/k2/ResGenerator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/generators/k3/ResGenerator.py) | ✅ | ✅ | ✅ | [2][gan], [3][cgan], [12][skip-conn] | -### Discriminators +#### Discriminators | Players | Source | Avail | Test | Skip conn | Aux proc | Refs | |:-------:|:------:|:-----:|:----:|:---------:|:--------:|:----:| -| Discriminator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k2/Discriminator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k3/Discriminator.py) | ✅ | ✅ | ❌ | ❌ | [1][1], [9][9], [10][10] | -| ResDiscriminator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k2/ResDiscriminator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k3/ResDiscriminator.py) | ✅ | ✅ | ✅ | ❌ | [1][1], [9][9], [10][10], [11][11] | -| AuxDiscriminator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k2/AuxDiscriminator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k3/AuxDiscriminator.py) | ✅ | ✅ | ✅ | ✅ | [1][1], [9][9], [10][10], [11][11], [12][12] | +| Discriminator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k2/Discriminator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k3/Discriminator.py) | ✅ | ✅ | ❌ | ❌ | [2][gan], [3][cgan], [11][gan-tricks] | +| ResDiscriminator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k2/ResDiscriminator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k3/ResDiscriminator.py) | ✅ | ✅ | ✅ | ❌ | [2][gan], [3][cgan], [11][gan-tricks], [12][skip-conn] | +| AuxDiscriminator | [`k2`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k2/AuxDiscriminator.py)/[`k3`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/discriminators/k3/AuxDiscriminator.py) | ✅ | ✅ | ✅ | ✅ | [2][gan], [3][cgan], [11][gan-tricks], [12][skip-conn], [13][aux-feat] | -### Other players +#### Other players | Players | Source | Avail | Test | Skip conn | Aux proc | Multiclass | |:-------:|:------:|:-----:|:----:|:---------:|:--------:|:---------:| @@ -79,31 +162,52 @@ | AuxMultiClassifier | [`src`](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/players/classifiers/AuxMultiClassifier.py) | ✅ | ✅ | ✅ | ✅ | ✅ | ### References -1. I.J. Goodfellow _et al._, "Generative Adversarial Networks", [arXiv:1406.2661][1] -2. A. Radford, L. Metz, S. Chintala, "Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks", [arXiv:1511.06434][2] -3. X. Mao _et al._, "Least Squares Generative Adversarial Networks", [arXiv:1611.04076][3] -4. M. Arjovsky, S. Chintala, L. Bottou, "Wasserstein GAN", [arXiv:1701.07875][4] -5. I. Gulrajani _et al._, "Improved Training of Wasserstein GANs", [arXiv:1704.00028][5] -6. M.G. Bellemare _et al._, "The Cramer Distance as a Solution to Biased Wasserstein Gradients", [arXiv:1705.10743][6] -7. D. Terjék, "Adversarial Lipschitz Regularization", [arXiv:1907.05681][7] -8. M. Arjovsky, L. Bottou, "Towards Principled Methods for Training Generative Adversarial Networks", [arXiv:1701.04862][8] -9. T. Salimans _et al._, "Improved Techniques for Training GANs", [arXiv:1606.03498][9] -10. M. Mirza, S. Osindero, "Conditional Generative Adversarial Nets", [arXiv:1411.1784][10] -11. K. He _et al._, "Deep Residual Learning for Image Recognition", [arXiv:1512.03385][11] -12. A. Rogachev, F. Ratnikov, "GAN with an Auxiliary Regressor for the Fast Simulation of the Electromagnetic Calorimeter Response", [arXiv:2207.06329][12] - -[1]: https://arxiv.org/abs/1406.2661 -[2]: https://arxiv.org/abs/1511.06434 -[3]: https://arxiv.org/abs/1611.04076 -[4]: https://arxiv.org/abs/1701.07875 -[5]: https://arxiv.org/abs/1704.00028 -[6]: https://arxiv.org/abs/1705.10743 -[7]: https://arxiv.org/abs/1907.05681 -[8]: https://arxiv.org/abs/1701.04862 -[9]: https://arxiv.org/abs/1606.03498 -[10]: https://arxiv.org/abs/1411.1784 -[11]: https://arxiv.org/abs/1512.03385 -[12]: https://arxiv.org/abs/2207.06329 +1. M. Barbetti, "The flash-simulation paradigm and its implementation based on Deep Generative Models for the LHCb experiment at CERN", PhD thesis, University of Firenze, 2024 +2. I.J. Goodfellow _et al._, "Generative Adversarial Networks", [arXiv:1406.2661][gan] +3. M. Mirza, S. Osindero, "Conditional Generative Adversarial Nets", [arXiv:1411.1784][cgan] +4. A. Radford, L. Metz, S. Chintala, "Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks", [arXiv:1511.06434][dcgan] +5. X. Mao _et al._, "Least Squares Generative Adversarial Networks", [arXiv:1611.04076][lsgan] +6. M. Arjovsky, S. Chintala, L. Bottou, "Wasserstein GAN", [arXiv:1701.07875][wgan] +7. I. Gulrajani _et al._, "Improved Training of Wasserstein GANs", [arXiv:1704.00028][wgan-gp] +8. M.G. Bellemare _et al._, "The Cramer Distance as a Solution to Biased Wasserstein Gradients", [arXiv:1705.10743][cramer-gan] +9. D. Terjék, "Adversarial Lipschitz Regularization", [arXiv:1907.05681][wgan-alp] +10. M. Arjovsky, L. Bottou, "Towards Principled Methods for Training Generative Adversarial Networks", [arXiv:1701.04862][pre-wgan] +11. T. Salimans _et al._, "Improved Techniques for Training GANs", [arXiv:1606.03498][gan-tricks] +12. K. He _et al._, "Deep Residual Learning for Image Recognition", [arXiv:1512.03385][skip-conn] +13. A. Rogachev, F. Ratnikov, "GAN with an Auxiliary Regressor for the Fast Simulation of the Electromagnetic Calorimeter Response", [arXiv:2207.06329][aux-feat] + +[gan]: https://arxiv.org/abs/1406.2661 +[dcgan]: https://arxiv.org/abs/1511.06434 +[lsgan]: https://arxiv.org/abs/1611.04076 +[wgan]: https://arxiv.org/abs/1701.07875 +[wgan-gp]: https://arxiv.org/abs/1704.00028 +[cramer-gan]: https://arxiv.org/abs/1705.10743 +[wgan-alp]: https://arxiv.org/abs/1907.05681 +[pre-wgan]: https://arxiv.org/abs/1701.04862 +[gan-tricks]: https://arxiv.org/abs/1606.03498 +[cgan]: https://arxiv.org/abs/1411.1784 +[skip-conn]: https://arxiv.org/abs/1512.03385 +[aux-feat]: https://arxiv.org/abs/2207.06329 ### Credits -Most of the GAN algorithms are an evolution of what provided by the [mbarbetti/tf-gen-models](https://github.com/mbarbetti/tf-gen-models) repository. The `BceGAN` model is freely inspired by the TensorFlow tutorial [Deep Convolutional Generative Adversarial Network](https://www.tensorflow.org/tutorials/generative/dcgan) and the Keras tutorial [Conditional GAN](https://keras.io/examples/generative/conditional_gan). The `WGAN_ALP` model is an adaptation of what provided by the [dterjek/adversarial_lipschitz_regularization](https://github.com/dterjek/adversarial_lipschitz_regularization) repository. +Most of the GAN algorithms are an evolution of what provided by the [mbarbetti/tf-gen-models](https://github.com/mbarbetti/tf-gen-models) repository. The BceGAN model is freely inspired by the TensorFlow tutorial [Deep Convolutional Generative Adversarial Network](https://www.tensorflow.org/tutorials/generative/dcgan) and the Keras tutorial [Conditional GAN](https://keras.io/examples/generative/conditional_gan). The WGAN-ALP model is an adaptation of what provided by the [dterjek/adversarial_lipschitz_regularization](https://github.com/dterjek/adversarial_lipschitz_regularization) repository. + +### Citing PIDGAN +To cite this repository: + +```bibtex +@software{pidgan:2024abc, + author = "Lucio Anderlini and Matteo Barbetti", + title = "{PIDGAN: GAN-based models to flash-simulate the LHCb PID detectors}", + version = "v0.2.0", + url = "https://github.com/mbarbetti/pidgan", + doi = "10.5281/zenodo.10463728", + publisher = "Zenodo", + year = "2024", +} +``` + +In the above bibtex entry, names are in alphabetical order, the version number is intended to be that from [pidgan/version.py](https://github.com/mbarbetti/pidgan/blob/main/src/pidgan/version.py), and the year corresponds to the project's open-source release. + +### License +PIDGAN has a GNU General Public License v3 (GPLv3), as found in the [LICENSE](https://github.com/mbarbetti/pidgan/blob/main/LICENSE) file.