-
open
miniconda
, create conda virtual environmentstomaenv
conda create --name stomaenv python=3.10.0 jupyter pandas
# after the first line has done
conda activate stomaenv
conda install conda-forge::ultralytics
conda install anaconda::dill
conda install anaconda::ipykernel
##optional: when you have GPU
#conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
#conda install nvidia/label/cuda-12.1.0::cuda
- open
NTU_detect_v8.ipynb
withvisual code studio
, select virtual environmentstomaenv
- run all the cell, select the folder where you store your stomata
images, results would be generated in the folder
runs
please clone this repository to your local directory.
-
open
Stomata.RProj
-
open
run.R
in folder “src
” -
run
set_up.R
to install necessary packages. -
create two folders named
data
andresults
from line 6-7. -
create sub-folder(s) under directory “data” (
data/sub-folder
)For example: folder
data/T16L600
contains all.xml
files from experiment T16L600.!!! .xml files can’t directly put in
data
, your need to put them under a folder insidedata
!!!
- run
read_xml.R
from line 11-13 to read the files and generate basic results for each batch - run
stat_analysis.R
line 18-20 to read the files and generate statistics for each stomata rows. - run
summarize_and_merge.R
line 23-25 to generate summarize statistics for each picture.
To tackle the issues of same detected position of a stomata have
different class from the NTU
pipeline.
- run line 29 to create the folder “result/Ntu”
- then placed the no ground truth’s pictures in “result/Ntu”
- run
clean_ntu.R
from line 33-35 to remove the duplicated detected stomata that has lower confidence. - merge.RDS will be the output removing the duplicated coordinates.
For those picture that is both manually labelled and detected by the
NTU
- run
check_ntu.R
from line 38-40 to validate the detected data with ground truth
- note that only picture with the same picture name as ground truth when the detected stomata center is 3.2 microm to the ground truth.
Want to contribute to the code? Very welcome!
- copy the script that you want to modified in ‘src/test’
- modified the code
- test if there is error
- move it to the original folder and overwrite
- make a pull request
Please raise your question in Issues and set a request in Project!
- Make sure your code is up to date (pull from github)
-
Describe the issue/problem/error clearly.
-
identify the error: Is it an error? (Do you received error message?)
- If yes, Which code, which line, which error
- If it is inside a loop, can you identify the index inside the loop?
- see here more for debug
- Interpretation of the message:
Google
the error/Chatgpt
- Reproduce the error: make sure it is reproducible
- Post on github/slack for help