LabelStoma
LabelStoma is a graphical image tool for automatically detecting stomata in images. In addition, LabelStoma also provides the necessary tools to correct the detections. LabelStoma is based on the LabelImg tool. A summary of the files included in this repository is provided in the following document.
Documentation
Installation and Requirements
LabelStoma can be run on Linux, Windows and macOS.
Get from PyPI but only python3.0 or above
LabelStoma can be installed both in Linux and Windows using pip.
pip install labelStoma
labelStoma
Build from source
Using Linux
This tool requires Python 3.6 and Qt5 and the packages listed in the requirements.txt
file.
- Clone this repository.
git clone https://github.com/ancasag/labelStoma
- Install the necessary dependencies.
cd labelStoma
sudo apt-get install pyqt5-dev-tools
pip3 install -r requirements.txt
make qt5py3
- Run labelStoma:
python3 labelStoma.py
Using macOS
This tool requires Python 3.6 and Qt5 and the packages listed in the requirements.txt
file.
- Clone this repository.
git clone https://github.com/ancasag/labelStoma
- Install the necessary dependencies.
brew install qt # Install qt-5.x.x by Homebrew
brew install libxml2
or using pip
pip3 install pyqt5 lxml # Install qt and lxml by pip
make qt5py3
- Run labelStoma:
python3 labelStoma.py
Datasets and weights
We train various models for the three stoma varieties and for the combination of all. All models, results and tools are available below.
Datasets for stoma detection
We have trained several models for the following datasets:
Weights for stoma detection
We have created several detection models for the aforementioned datasets using the algorithm YOLO. The trained models are available in the format used by YOLO framework, and distributed under the GNU General Public License v3.0
SoyBean | CommonBean | Barley | Combined | |
---|---|---|---|---|
None | weights | weights | weights | weights |
Geometric | weights | weights | weights | weights |
Colour | weights | weights | weights | weights |
Combined | weights | weights | weights | weights |
Jupyter Notebook
LabelStoma allows the creation of stoma detection models based on the YOLO detection algorithm. To do this, it generates a zip file with the structure required by this algorithm and a jupyter notebook with the appropriate steps to create a model. This notebook can be downloaded from here. We also include two other notebooks; one that allows applying test-time augmentation (TTA) and the other that allows progressive resizing.
Hotkeys
Ctrl + o | Open a image |
Ctrl + u | Open a set of images |
Ctrl + q | Close the app |
Ctrl + w | Close the image |
z | Detect stomata |
e | Generate excel |
r | Create a new stoma detection |
w | Create a new surface detection |
l | Create a new scale detection |
del | Delete the selected rect box |
Acknowledgements
This work was partially supported by Ministerio de Economía y Competitividad [MTM2017-88804-P], Ministerio de Ciencia, Innovación y Universidades [RTC-2017-6640-7], and Agencia de Desarrollo Económico de La Rioja [2017-I-IDD-00018].