astroaugmentations
A package with various custom augmentations implemented which are specifically designed around astronomical data.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.0%) to scientific vocabulary
Keywords
Repository
A package with various custom augmentations implemented which are specifically designed around astronomical data.
Basic Info
Statistics
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 3
- Releases: 1
Topics
Metadata Files
README.md
AstroAugmentations
Custom image augmentations specifically designed around astronomical instruments and data. Please open an issue to highlight missing augmentations and / or datasets. This is an open source project, so feel free to fork, make changes and submit a pull request of your additions and modifications!
This package is in active development and although it should work, it may be a bit temporamental and require some love to get to know. Feel free to make suggestions using the issue tracker.
This package is based on Albumentations. This should allow scalability and applicability in a multitude of cases, including both TensorFlow and PyTorch.
Features
- Augmentations designed for specific astronomical domains and data formats.
- Access to standardized default data sets.
- Most recent version covers:
- Radio image augmentations (designed with interferometers in mind)
Quick Start
Importing: import astroaugmentations as AA.
Install:
python
pip install -U git+https://github.com/mb010/AstroAugmentations.git
pip install -U git+https://github.com/albumentations-team/albumentations
:warning: Currently requires torch and torchvision which are not autmatically installed!
The version you install depends on your system.
Please see the official PyTorch site to download
an appropriate configuration. These are currently used in the example datasets.\
Developed using: torch>=1.10.2+cu113 and 'torchvision>=0.11.3+cu113.
Usage
The default is to import the package as AA: import astroaugmentations as AA.
Augmentations for each data type are seperated into individual modules,
each of which will contain submodules with regime specific augmentations e.g.:
- AA.image_domain contains transformations designed for imaging / computer vision tasks.
- AA.image_domain.optical provides augmentations specifically designed around optical imaging.
- AA.image_domain.radio provides augmentations specifically designed around radio imaging.
AA.composed contains 'ready to go'
example compositions
of multiple transforms explicitly designed for a data type and regime.
AA.CustomKernelConvolution() requires a kernel to be available in a directory as
a saved numpy array (e.g. ./kernels/FIRST_kernel.npy). We provide a kernel we generated
here
(designed for the FIRST Survey).
Demo / Examples
Please see the ipython notebooks provided for demonstrations of the various augmentations. These are implemented using Torch. The interaction with the Albumentations package should allow for AstroAugmentations to be applied to other frameworks. See examples of their implementations here.
Using the in-built datasets
Data sets are provided in astroaugmentations/datasets. See use examples in the demonstration ipython notebooks.
Adapting Data Loaders (PyTorch)
Following Albumentions notation, we adapt respective torch data loaders from a functional call to an Albumnetations call as shown in their PyTorch Example which allows respective transformations to be applied simultaneously to segmentation masks. We present an example of what this can look like.
Assuming there is a self.transform attribute as a parameter in our data class. In which case, normally inside the __getitem__ method, a conditional application of the transform is made:
if self.transform is not None:
image = self.transform(image)
For Albumentations, and thus our package, we need to adapt this notation. In the case of image augmentations (no mask augmentations) we write:
if self.transform is not None:
image = self.transform(image=image)["image"]
This seems unnecessary, until we consider an example of what happens when we try to apply our transformations to masks as well as the input:
if self.transform is not None:
transformed = self.transform(image=image, mask=mask)
image = transformed["image"]
mask = transformed["mask"]
Package Structure:
AstroAugmentations
├── LICENSE
├── astroaugmentations
│ ├── __init__.py
│ ├── image_domain
│ │ ├── general.py
│ │ ├── optical.py
│ │ └── radio.py
│ ├── utils
│ │ ├── __init__.py
│ │ ├── VLA_raw_antenna_position.py
│ │ └── kernel_creation.py
│ ├── datasets
│ │ ├── __init__.py
│ │ ├── galaxy_mnist.py
│ │ └── MiraBest_F.py
│ └── composed.py
├── README.md
└── setup.py
Citation
@software{Bowles_AstroAugmentations_2023,
author = {Bowles, Micah},
month = jun,
title = {{AstroAugmentations}},
url = {https://github.com/mb010/AstroAugmentations},
version = {0.1.0},
year = {2023}
}
Contact
For questions please contact: micah.bowles@postgrad.manchester.ac.uk \ For bugs or any issues with implementing this package, please open an issue.
Owner
- Name: Micah Bowles
- Login: mb010
- Kind: user
- Location: UK
- Company: The University of Manchester
- Website: https://mb010.github.io/
- Twitter: Micah_mb010
- Repositories: 4
- Profile: https://github.com/mb010
PhD Student - AI for Astronomy & Astrophysics.
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Bowles" given-names: "Micah" orcid: "https://orcid.org/0000-0001-5838-8405" title: "AstroAugmentations" version: 0.1.0 date-released: 04-06-2023 url: "https://github.com/mb010/AstroAugmentations"
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 29
- Total Committers: 4
- Avg Commits per committer: 7.25
- Development Distribution Score (DDS): 0.345
Top Committers
| Name | Commits | |
|---|---|---|
| Micah | m****s@p****k | 19 |
| mb010 | 5****0@u****m | 6 |
| Inigo Val | i****l@g****m | 3 |
| patrikasvanagas | 8****s@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 5
- Total pull requests: 6
- Average time to close issues: 8 days
- Average time to close pull requests: 12 days
- Total issue authors: 2
- Total pull request authors: 5
- Average comments per issue: 1.2
- Average comments per pull request: 0.5
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- mb010 (4)
- wjpearson (1)
Pull Request Authors
- inigoval (2)
- mb010 (1)
- TrellixVulnTeam (1)
- wjpearson (1)
- patrikasvanagas (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 16 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 1
- Total maintainers: 1
pypi.org: astroaugmentations
Augmentations for astronomical data sets
- Homepage: https://github.com/mb010/AstroAugmentations
- Documentation: https://astroaugmentations.readthedocs.io/
- License: MIT License
-
Latest release: 0.1.0
published about 4 years ago
Rankings
Maintainers (1)
Dependencies
- astropy *
- h5py *