Plugin to enhance fish detection and analysis for underwater research
Project description
fish-scan
Plugin to enhance fish detection and analysis for underwater research
This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.
Installation
You can install fish-scan
via pip:
pip install fish-scan
To install latest development version :
pip install git+https://github.com/ariannaravera/fish-scan.git
Tutorial
1. Color correction
With this tool you can correct colors in your image.
- Open your image in napari by grabbing and dropping it or opening from the menu
- Click on “Select the area” to select a rectagular area of the color you wanna correct
- Draw the rectangle in the area in which you have that color, eg. white area, as in the example below
- Select the color name in the dropdown box, eg. in this case white
- Click on “Correct color”
- If you’re satisfied of the correction made, it is IMPORTANT to select as input “Image”(first box) the name of the new generated image (usually, “Currect_corrected_...)*
- Cuntinue your colors corrections re-starting from step 2
Nomenclature:
- you MUSH have your original image with its original name (in this case “Group2_FishID_25April…”)
- then, once you start correcting the image, the new generated images will be called as “Current_corrected_original-name”
- if you perform the correction more times, your previous corrected image will be named “Previous_corrected_original-name” and the new generated always “Current_corrected_original-name”.
This allows you to keep as “previous” the result that you already liked and approved, while the “current” you can play and experiment new corrections. Be aware that if you select as input image of the correction “previous” this means that you didn’t like the “current” one and it will be overwrite (while the “previous” remain the same), otherwise if you liked the “current” and you use it as input image of the new correction, then the “current” will become “previous” and the new result “current”. At anytime if you want you can re-start from the original image by selecting it as input image (original image is NEVER changed).
2. Set Scale
With this tool you can automatically measure your fish if a scale is in the image.
-
Click on “Select 1 cm” and draw a line on the scale represeting 1cm, as in this example:
-
Click on “Set scale” and your fish will be automaticall measure in your final analysis with this scale
3. Segmentation & Analysis
With this tool you can segment your fish.
Steps:
-
Select the “Image” you want to analyse (be aware of the nomenclature*)
-
Click “Select fish area” button
-
Start drawing your mask with the brush (yellow arrow below). I suggest to start drwaing the fish contours and then with the paint bucket (red arrow below) fill the inside. Adjust it with the eraser (orange arrow below) if needed
-
Select the output folder you want the results saved in by clicking “Browse”
-
Finally, click on “Analyse the fish” to generate your analysis
Here is an example of the results you obtain from it: • two graphs per image, o one representing the percentage of the 3 dominant color you want to study (black, white and orange)
o one with the composition of the real RGB values found in the image (the ones that are categorized in the 3 main classes you have in graph 1)
• one csv file in which there are the number of black, white and orange pixels, their percentages (same values of graph 1), the length of the fish in pixels (always provided) and the length converted in cm (if a scale was provided). o If in the output folder chosen there were already a previously created csv we will append to that the new info, otherwise a new csv is created.
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, "fish-scan" is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fish_scan-1.0.8.tar.gz
.
File metadata
- Download URL: fish_scan-1.0.8.tar.gz
- Upload date:
- Size: 5.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef0e9795dfc59ac0dd4602bdfe061919ac203c1b6a77c255becd0411def13e73 |
|
MD5 | a7a49d4fa55db95f2c7049a90c6781fa |
|
BLAKE2b-256 | 149d765b7bf055d091bb21317e1430a5f859871b2a129f1611acab7144aae8a5 |
File details
Details for the file fish_scan-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: fish_scan-1.0.8-py3-none-any.whl
- Upload date:
- Size: 5.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a46939decc04b4767e97371250bd48a091aa197b173cbd7ca09a3c791b4c0f49 |
|
MD5 | 442ca21eca5928aa722cd59aae9e4c83 |
|
BLAKE2b-256 | 1329080ce79ab5ec04669afafee28a5dcf9a1b1f00e486e5928854956846d2e5 |