yaredtaddese / leaf-image-segmentation Goto Github PK
View Code? Open in Web Editor NEWLeaf Image Segmentation
License: MIT License
Leaf Image Segmentation
License: MIT License
Yuca plant root.
Traceback (most recent call last):
File "leaf-image-segmentation/segment.py", line 163, in <module>
segment_leaf(os.path.join(base_folder, file), filling_mode, smooth, args.marker_intensity)
File "leaf-image-segmentation/segment.py", line 66, in segment_leaf
select_largest_obj(bin_image, fill_mode=filling_mode,
File "leaf-image-segmentation/background_marker.py", line 213, in select_largest_obj
largest_obj_lab = np.argmax(lab_stats[1:, 4]) + 1
File "<__array_function__ internals>", line 5, in argmax
File "leaf-image-segmentation/venv/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 1188, in argmax
return _wrapfunc(a, 'argmax', axis=axis, out=out)
File "leaf-image-segmentation/venv/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc
return bound(*args, **kwds)
ValueError: attempt to get argmax of an empty sequence
Lesion on edge of leaves is ignored when segmented, practically denying that the lesion is part of the leaf and considering it as background rather than leaf part. This results in a bad segmentation for applications that rely on the existence of such lesion parts of leaves in the input, for example, for applications that detect plant diseases and the likes.
Traceback (most recent call last):
File "leaf-image-segmentation/segment.py", line 162, in <module>
segment_leaf(os.path.join(base_folder, file), filling_mode, smooth, args.marker_intensity)
File "leaf-image-segmentation/segment.py", line 66, in segment_leaf
select_largest_obj(bin_image, fill_mode=filling_mode,
File "leaf-image-segmentation/background_marker.py", line 229, in select_largest_obj
cv2.floodFill(img_floodfill, mask_, seedPoint=bkg_seed,
cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-ms668fyv/opencv/modules/imgproc/src/floodfill.cpp:509: error: (-211:One of the arguments' values is out of range) Seed point is outside of image in function 'floodFill'
I have never used argparse library, so I am having difficulty modifying the code. Instead of giving the image source while running the python file that is python segment.py testimage, I want give the path of image inside the segment.py file . How to do it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.