Accuracy assessment on edge
Project description
edge_assessment
An assessment tool for evaluating the quality of object edges within an input map.
Table of Contents
Background
An accurate delineation of edge is critical for object-based image analysis on land resources such as agricultural field objects and building objects, and change detection particularly for climate-induced land change such as snow melting and treeline shifts. The traditional F1-score has been widely used for assessing map quality, which, however, often fails to provide information on object boundary quality. To address this problem, we developed a new evaluation index to take account of both thematic and edge accuracy.
Install
Install AssessEdge using pip:
pip install AssessEdge
Use requirements.txt to install the required packages.
pip install -r requirements.txt
Usage
The two main functions are eval_edge and plot_results in edge_buffer.py
eval_edge(testing_field, reference_field, step, min_width, initial_max_width): input two variables(testing_field & reference_field), the testing_field represents the result of classification, the reference_field represents the real reference object field. The pixel values of target objects should be processed as 1, and pixel values of background should be 0 or no data. The function will return a dictionary include commission error, omission error, edge f1 score, middle point, etc. The step defaults as 3, the initial_max_width defaults as 0, and the min_width defaults as 3.
plot_results: show the testing_field and reference_field data fit curves and their data points.
Users can type the following codes to use these two functions
from AssessEdge import eval_edge, plot_results
from AssessEdge import rasterio_loaddata
def main(map_path, reference_path):
map_path = "/images/testing_field.tif"
reference_path = "/images/reference_field.tif"
map_array = rasterio_loaddata(map_path)
reference_array = rasterio_loaddata(reference_path)
result = eval_edge(map_array, reference_array)
plot_results(result)
if __name__ == "__main__":
main()
Test
Testing images have been placed in the images folder. The test procedure is assess_image.py in test folder. To test it
python assess_image.py --map_path map_path --reference_path reference_path
It will show the test result as following
Contributors
Yingfan Zhang (zhangyingfanuk@163.com), Su Ye
License
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file assessedge-2.0.tar.gz.
File metadata
- Download URL: assessedge-2.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5436e08da2ee0fb8d6145589e34835140a725e556190eaa6fde419a36106fce1
|
|
| MD5 |
fc12c3a323bfc758fe42703815ae8ff8
|
|
| BLAKE2b-256 |
c48207019d09780e926640ec9854ab31a198d441128fcfc600024d831fa81389
|
File details
Details for the file AssessEdge-2.0-py3-none-any.whl.
File metadata
- Download URL: AssessEdge-2.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95b5c10c1e831b99dc50017c676b57af666e1cb8be3bcfc39a197e1af6cb448b
|
|
| MD5 |
fc4231b3a5f020bf251df5bd6cb74415
|
|
| BLAKE2b-256 |
06d85ec9d1215d4e004938649c0166f347156131a127242fda93bb10153c020c
|