sciaugment
SciAugment aims to provide tools for image augmentation based on machine on which images were taken.
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
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Repository
SciAugment aims to provide tools for image augmentation based on machine on which images were taken.
Basic Info
- Host: GitHub
- Owner: martinschatz-cz
- License: bsd-3-clause
- Language: Jupyter Notebook
- Default Branch: main
- Size: 1.33 MB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 3
Metadata Files
README.md
SciAugment v0.2.0
SciAugment aims to provide tools for image augmentation for object detection (YOLO) based on machine on which images were taken.
The tools are created around idea that to create more robust detecton or classification, augmentation needs to be done with respect of how the imaging process works. That is mainly problematic with respect to brightness values. Albumentaion package (which is ingeniuos as is for RGB data) is used for augmentation as flips, rotations or addition of noise. But other channel focused augmentation needs to be added in future.
So far three experimental approaches exists.
aug_type (str)
Default setting, which only flips and rotates images.
fluorescece_microscopy setting, which aims to reproduce noise and brightness shifts, and has to be tested and tuned.
all Will aplly all augmentation.
no_augment No augment setting will only divide images and labels to train_data folder
channel_aug (boolean)
True/False False as default. This setting will allow channel wise augmentation
The input file type can be specified, expects RGB image and is done by OpenCV. The results by deafult is .jpeg input .png, and there is possibility to change it when applying the augmentation.
SciAugment creates one image for each augmentation, and marks resulting image (so user have more controll over results and feedback). The result is preapred as traindata folder with 70/30 distribution for train/test and can be directly used for training of YOLOv5.
Examples
Example Google Colab notebook shows simple use of augmentation of both image and YOLO anotation. In folder is small test set of images and annotations (made in https://www.makesense.ai/), result is prepared train_data folder with 70/30 train/test distribution.
Examples of object detection with YOLO v5 (in form of Colab Notebooks) can be found in SciCount project.
Easy use
Instal package
bash
pip install git+https://github.com/martinschatz-cz/SciAugment.git
Import all tools
python
from SciAugment.SciAug_tools import *
Create and augmentation type object, and apply channel wise augmentation on folde with images and YOLO anotations ```python aug2 = SciAugment(augtype = 'fluorescecemicroscopy', channelaug = True) inputimagesfolder = 'data/fortraining' inputimageformat = '.jpeg' outformat = '.png' aug2.augmentdata(imagespath=inputimagesfolder, imageformat=inputimageformat, train = 0.7, outputimageformat = out_format)
or for channel augmentation
aug2.augmentdataperchannel(imagespath=inputimagesfolder, imageformat=inputimageformat, train = 0.7, outputimageformat = outformat)
```
Results is train_data folder wit (default) 70/30 train/test random distribution.
More examples of how to use ScuAugment are in folder with examples.
To Do
- [x] Image augmentation
- [x] Channel augmentation
- [ ] Custom hyperparameter and augmentation settings YAML to overwrite YOLO settings
- [ ] Custem setup for channel and image augmentation
- [ ] Automatic setting export for easier reproducibility
- [ ] Import for reproducibility
- [ ] Default and custom settings for each augmentation.
- [ ] Manual for reading optimal values from imaged data.
SciCount
SciAugment is part of SciCount project.
How to cite
@MISC{Schatz2022-SciAugment,
title = "{martinschatz-cz/SciAugment}: v0.1.0",
author = "Sch{\"a}tz, Martin",
abstract = "The whole tool was rewritten as a class, and two options for
prepared augmentations were set up. Everything is shown in the
example Google Colab notebook on a small included annotated
(YOLO) image dataset.",
publisher = "Zenodo",
year = 2022
}
Owner
- Name: Martin Schätz
- Login: martinschatz-cz
- Kind: user
- Location: Prague, Czech republic
- Company: UCT Prague, VMCF - Science Faculty of Charles University, Natinal Technical Library in Prague
- Website: www.schaetz.cz
- Twitter: SchatzCZ
- Repositories: 9
- Profile: https://github.com/martinschatz-cz
BioImage Analyst
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Schätz" given-names: "Martin" orcid: "https://orcid.org/0000-0003-0931-4017" title: "SciAugment" version: 0.2.0 doi: 10.5281/zenodo.6940265 date-released: 2022-07-29 url: "https://github.com/martinschatz-cz/SciAugment"
GitHub Events
Total
- Issues event: 1
Last Year
- Issues event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 3
- Total pull requests: 6
- Average time to close issues: 20 days
- Average time to close pull requests: 1 minute
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 1
- Average time to close issues: 20 days
- Average time to close pull requests: 1 minute
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- martinschatz-cz (2)
- chloejeannin (1)
Pull Request Authors
- martinschatz-cz (7)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- opencv-python-headless ==4.1.2.30
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- albumentations >=1.3.1
- imgaug >=0.4.0
- opencv-python-headless >=3.4.18.65
- python 3.9 build
- black *
- isort *
- jupyterlab *
- jupyterlab_code_formatter *
- seaborn *
- watermark *