crop_image
Small repository to store the cropping step of the BGNN Fish project
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 (10.9%) to scientific vocabulary
Repository
Small repository to store the cropping step of the BGNN Fish project
Basic Info
- Host: GitHub
- Owner: hdr-bgnn
- License: mit
- Language: Python
- Default Branch: main
- Size: 16.1 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 3
- Releases: 4
Metadata Files
README.md
Crop_image
Small repository to store the "cropping" step of the BGNN project.
This repo is linked to main BGNN Core Workflow that encompasses a complete analysis workflow. It contained the code for the "Cropping" part see here. It is easier to understand the purpose this code and its application if you are familar with BGNN_Snakemake repo.
1 - Short description
- We use raw fish image available at Fish-AIR and Metadata json file generated by Drexel_metadata and reformatted by Drexelmetadataformatter to crop the fish out of a more complexe image.
input

Cropped output

2 - Usage
Input example : + fish image .jpg see INHSFISH000742.jpg + Metadata.json see INHSFISH000742.json
Ouput : + Cropped image .jpg [see INHSFISH000742cropped.jpg]Testdata/INHSFISH000742_cropped.jpg)
Usage in python you need the environment define by crop_env.yml. I suggest to use anaconda or miniconda as environment manager
Crop_image_main.py [-h] [--increase] input_image imput_metadata output
Example using the Test_data with 10% increase in size
Crop_image_main.py INHS_FISH_000742.jpg INHS_FISH_000742.json INHS_FISH_000742_cropped.jpg --increase 0.10
The --increase parameter defines the fractional increase of the bounding box from the original metadata size in each direction (10% in this example). The default value in 0.05.
3 - Container and test
The container can be download here:
``` docker pull ghcr.io/hdr-bgnn/crop_image:latest
or
singualarity docker://ghcr.io/hdr-bgnn/crop_image:latest ```
Container Usage:
In this section the name of the container "cropimage0.0.2.sif" will depend on the version you are downloading or the name you give to container .sif
The usage can be display like this:
singularity run crop_image_0.0.2.sif
To execute the code on the test images test data, run the following
singularity exec crop_image_0.0.2.sif Crop_image_main.py Test_data/INHS_FISH_000742.jpg Test_data/INHS_FISH_000742.json Test_data/INHS_FISH_000742_cropped_test.jpg
Owner
- Name: Biology Guided Neural Networks
- Login: hdr-bgnn
- Kind: organization
- Repositories: 10
- Profile: https://github.com/hdr-bgnn
Citation (CITATION.cff)
cff-version: 1.0.0
date-released: "2023-05-30"
abstract: "Crop_Image is a small repository to store the cropping step of the BGNN Minnow_Segmented_Traits project. This repo is linked to main BGNN Core Workflow that encompasses a complete analysis workflow. It contained the code for the cropping part."
authors:
- family-names: Tabarin
given-names: Thibault
orcid: "https://orcid.org/0000-0003-4256-849X"
- family-names: Bradley
given-names: John
orcid: "https://orcid.org/0000-0003-3858-848X"
- family-names: Lapp
given-names: Hilmar
orcid: "https://orcid.org/0000-0001-9107-0714"
identifiers:
- description: "Snapshot of Crop_image: Version 0.0.4"
type: doi
value: 10.5281/zenodo.7987485
keywords:
- "imageomics"
- "image"
license: MIT
repository-code: "https://github.com/hdr-bgnn/Crop_image"
title: "Crop image"
version: 0.0.4
GitHub Events
Total
Last Year
Dependencies
- actions/checkout v2 composite
- docker/build-push-action ad44023a93711e3deb337508980b4b5e9bcdc5dc composite
- docker/login-action f054a8b539a109f9f41c372932f1ae047eff08c9 composite
- docker/metadata-action 98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 composite
- ubuntu 20.04 build