Comments (2)
Got it ,I am deeply indebted to you for your help.
from beyond-iou.
Hi,
thanks for your interest.
Here's a snippet showing how you can use our method on your binary dataset:
from beyond_iou import Evaluator, build_segmentation_loader, Result
evaluator = Evaluator(
class_names=['background', 'foreground'],
ignore_index=255, # optionally modify for your case if there are ignore pixels
boundary_width=0.01, # choose reasonably for your case
)
loader = build_segmentation_loader(
pred_dir='path/to/your/predictions', # as 0-1 images, otherwise use pred_label_map to map label ids accordingly
gt_dir='path/to/your/groundtruth', # as 0-1 images, otherwise use gt_label_map to map label ids accordingly
gt_label_map=None,
pred_label_map=None,
num_workers=0,
pred_suffix='',
gt_suffix=''
)
result = evaluator.evaluate(loader)
result.create_report('your/output/directory', exist_ok=True)
This treats background (0) and foreground (1) as separate classes and computes the metrics as the mean over the two classes. If you are interested in the results for the foreground class only, you can access them through result.dataframe
.
from beyond-iou.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beyond-iou.