lilferrit commited on
Commit
fad2a05
1 Parent(s): 8033078

readme.md, user guide

Browse files
Files changed (3) hide show
  1. README.md +60 -11
  2. larvaecount/docs/user_guide.md +7 -1
  3. license.txt +18 -0
README.md CHANGED
@@ -1,11 +1,60 @@
1
- ---
2
- title: Larvae Counter
3
- emoji: 📚
4
- colorFrom: indigo
5
- colorTo: blue
6
- sdk: docker
7
- pinned: false
8
- license: mit
9
- ---
10
-
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Larvae Counter
2
+
3
+ Welcome to the Larvae Counter repo! This web-app utilizes several computer vision techniques to
4
+ automate mosquito larvae and pupae counting tasks in a lab setting. To get started visit
5
+ the web-app [here](https://lilferrit.github.io/larvaecount/).
6
+
7
+ ## About
8
+
9
+ The Larvae Counter web-app is implemented purely in python. Most image processing is done using
10
+ the [OpenCV](https://opencv.org/) library and the web-ui is written using Plotly's
11
+ [Dash](https://dash.plotly.com/) library. The web-app is currently hosted on Huggingface
12
+ [here](https://huggingface.co/spaces/lilferrit/larvae-counter).
13
+
14
+ ## Running Locally
15
+
16
+ To run the larvae counter app locally first clone the repo. Next, navigate to the repo folder using:
17
+
18
+ ```
19
+ cd larvaecount
20
+ ```
21
+
22
+ or your system's equivalent. Next, install the project dependencies (you may choose
23
+ to so in a virtual environment):
24
+
25
+ ```
26
+ pip install -r requirements.txt
27
+ ```
28
+
29
+ Then install the larvaecount package itself:
30
+
31
+ ```
32
+ pip install .
33
+ ```
34
+
35
+ to run the web app run
36
+
37
+ ```
38
+ python3 -m larvaecount.app --debug=<True/False> --port="<port>" --host="<host-addr>"
39
+ ```
40
+
41
+ Note: The debug, port, and host arguments are optional and default to `False`, `8080` and
42
+ `127.0.0.1` respectively.
43
+
44
+ ## Using the CLI
45
+
46
+ All of the counting methods are also available via the command line. To run the CLI run the
47
+ command:
48
+
49
+ ```
50
+ python3 -m larvaecount.cli <counting_method> <args>
51
+ ```
52
+
53
+ The command line arguments are passed directly to the functions in
54
+ [larvaecount/cli.py](larvaecount/cli.py) using the
55
+ [python-fire](https://github.com/google/python-fire) library. See
56
+ [larvaecount/cli.py](larvaecount/cli.py) for usage instructions.
57
+
58
+ ## License
59
+
60
+ This project uses the MIT license, see [license.txt](license.txt)
larvaecount/docs/user_guide.md CHANGED
@@ -93,4 +93,10 @@ it iterates over regions contained within (an) elliptical contour(s).
93
  - `Max Pupae Per Cluster (Optional)`: Maximum number of pupae per cluster, used to filter out any
94
  large dark blobs in the image.
95
  - `Filter Kernel Width (Pixels)`: Width (in pixels) of the elliptical filter.
96
- - `Filter Kernel Height (Pixels)`: Height (in pixels) of the elliptical filter.
 
 
 
 
 
 
 
93
  - `Max Pupae Per Cluster (Optional)`: Maximum number of pupae per cluster, used to filter out any
94
  large dark blobs in the image.
95
  - `Filter Kernel Width (Pixels)`: Width (in pixels) of the elliptical filter.
96
+ - `Filter Kernel Height (Pixels)`: Height (in pixels) of the elliptical filter.
97
+
98
+ ### YoloV8 (Coming Soon!!)
99
+
100
+ Deep learning implementation of the larvae/pupae counter. Not only should a deep learning
101
+ approach have far less parameters to tune, it should perform **much** better than the old-school
102
+ computer vision approaches currently in use.
license.txt ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Copyright 2024 Gavin Straub
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the “Software”), to deal in the Software without restriction,
7
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
8
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or
12
+ substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
16
+ AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
17
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.