Skip to content

Commit 980b4da

Browse files
committed
Fixed and simplified the description of the readme files.
1 parent c413a23 commit 980b4da

File tree

2 files changed

+13
-43
lines changed

2 files changed

+13
-43
lines changed

readme.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## Introduction
1414

15-
A simple and efficient implementation of SOD metrics
15+
A simple and efficient implementation of SOD metrics.
1616

1717
- Based on `numpy` and `scipy`
1818
- Verification based on Fan's matlab code <https://github.com/DengPingFan/CODToolbox>
@@ -23,7 +23,7 @@ Your improvements and suggestions are welcome.
2323

2424
### Related Projects
2525

26-
- A Python-based salient object detection and video object segmentation evaluation toolbox. <https://github.com/lartpang/Py-SOD-VOS-EvalToolkit>
26+
- [PySODEvalToolkit](https://github.com/lartpang/PySODEvalToolkit): A Python-based Evaluation Toolbox for Salient Object Detection and Camouflaged Object Detection
2727

2828
### Supported Metrics
2929

@@ -35,7 +35,7 @@ Your improvements and suggestions are welcome.
3535
| Multi-Scale IoU | bin | | `MSIoU` |
3636
| E-measure ($E_{m}$) | max,avg,adp | | `Emeasure` |
3737
| F-measure (old) ($F_{beta}$) | max,avg,adp | | `Fmeasure` |
38-
| F-measure (old) ($F_{beta}$, $F_{1}$) | max,avg,adp,bin | bin | `FmeasureV2`+`FmeasureHandler` |
38+
| F-measure (new) ($F_{beta}$, $F_{1}$) | max,avg,adp,bin | bin | `FmeasureV2`+`FmeasureHandler` |
3939
| BER | max,avg,adp,bin | bin | `FmeasureV2`+`BERHandler` |
4040
| Dice | max,avg,adp,bin | bin | `FmeasureV2`+`DICEHandler` |
4141
| FPR | max,avg,adp,bin | bin | `FmeasureV2`+`FPRHandler` |
@@ -48,24 +48,6 @@ Your improvements and suggestions are welcome.
4848
| Specificity | max,avg,adp,bin | bin | `FmeasureV2`+`SpecificityHandler` |
4949
| TNR | max,avg,adp,bin | bin | `FmeasureV2`+`TNRHandler` |
5050
| TPR | max,avg,adp,bin | bin | `FmeasureV2`+`TPRHandler` |
51-
## TODO List
52-
53-
- [x] Speed up the calculation of Emeasure.
54-
- [x] Add the necessary documentation for different functions.
55-
56-
## Compared with [Matlab Code from Fan](https://github.com/DengPingFan/CODToolbox)
57-
58-
In our comparison (the test code can be seen under the `test` folder), the result is consistent with Fan's code, as follows:
59-
60-
```text
61-
ours: Smeasure:0.903; wFmeasure:0.558; MAE:0.037; adpEm:0.941; meanEm:0.957; maxEm:0.967; adpFm:0.582; meanFm:0.577; maxFm:0.589
62-
matlab: Smeasure:0.903; wFmeasure:0.558; MAE:0.037; adpEm:0.941; meanEm:0.957; maxEm:0.967; adpFm:0.582; meanFm:0.577; maxFm:0.589.
63-
```
64-
65-
**NOTE**
66-
67-
- The matlab code needs to change `Bi_sal(sal>threshold)=1;` to `Bi_sal(sal>=threshold)=1;` in <https://github.com/DengPingFan/CODToolbox/blob/910358910c7824a4237b0ea689ac9d19d1958d11/Onekey_Evaluation_Code/OnekeyEvaluationCode/main.m#L102>. For related discussion, please see [the issue](https://github.com/DengPingFan/CODToolbox/issues/1).
68-
- 2021-12-20 (version `1.3.0`): Due to the difference between numpy and matlab, in version `1.2.x`, there are very slight differences on some metrics between the results of the matlab code and ours. The [recent PR](https://github.com/lartpang/PySODMetrics/pull/3) alleviated this problem. However, there are still very small differences on E-measure. The results in most papers are rounded off to three or four significant figures, so, there is no obvious difference between the new version and the version `1.2.x` for them.
6951

7052
## Usage
7153

@@ -81,8 +63,9 @@ The core files are in the folder `py_sod_metrics`.
8163

8264
## Reference
8365

84-
- <https://github.com/DengPingFan/CODToolbox>
85-
- By DengPingFan(<https://github.com/DengPingFan>)
66+
- [Matlab Code](https://github.com/DengPingFan/CODToolbox) by DengPingFan(<https://github.com/DengPingFan>): In our comparison (the test code can be seen under the `test` folder), the result is consistent with the code.
67+
- The matlab code needs to change `Bi_sal(sal>threshold)=1;` to `Bi_sal(sal>=threshold)=1;` in <https://github.com/DengPingFan/CODToolbox/blob/910358910c7824a4237b0ea689ac9d19d1958d11/Onekey_Evaluation_Code/OnekeyEvaluationCode/main.m#L102>. For related discussion, please see [the issue](https://github.com/DengPingFan/CODToolbox/issues/1).
68+
- 2021-12-20 (version `1.3.0`): Due to the difference between numpy and matlab, in version `1.2.x`, there are very slight differences on some metrics between the results of the matlab code and ours. The [recent PR](https://github.com/lartpang/PySODMetrics/pull/3) alleviated this problem. However, there are still very small differences on E-measure. The results in most papers are rounded off to three or four significant figures, so, there is no obvious difference between the new version and the version `1.2.x` for them.
8669
- <https://en.wikipedia.org/wiki/Precision_and_recall>
8770

8871
```text

readme_zh.md

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212

1313
## 介绍
1414

15-
一份简单有效的 SOD 指标实现
15+
一份简单有效的 SOD 指标实现
1616

1717
- 基于`numpy`和极少量`scipy.ndimage`代码
18-
- 基于 DengPing Fan <https://github.com/DengPingFan/CODToolbox>
18+
- 基于 DengPing Fan <https://github.com/DengPingFan/CODToolbox> 进行对比验证
1919
- 结构简单,易于扩展
2020
- 代码轻量且快速
2121

2222
欢迎您的改进和建议。
2323

2424
### 相关项目
2525

26-
- A Python-based salient object detection and video object segmentation evaluation toolbox. <https://github.com/lartpang/Py-SOD-VOS-EvalToolkit>
26+
- [PySODEvalToolkit](https://github.com/lartpang/PySODEvalToolkit): A Python-based Evaluation Toolbox for Salient Object Detection and Camouflaged Object Detection
2727

2828
### 支持的指标
2929

@@ -35,7 +35,7 @@
3535
| Multi-Scale IoU | bin | | `MSIoU` |
3636
| E-measure ($E_{m}$) | max,avg,adp | | `Emeasure` |
3737
| F-measure (old) ($F_{beta}$) | max,avg,adp | | `Fmeasure` |
38-
| F-measure (old) ($F_{beta}$, $F_{1}$) | max,avg,adp,bin | bin | `FmeasureV2`+`FmeasureHandler` |
38+
| F-measure (new) ($F_{beta}$, $F_{1}$) | max,avg,adp,bin | bin | `FmeasureV2`+`FmeasureHandler` |
3939
| BER | max,avg,adp,bin | bin | `FmeasureV2`+`BERHandler` |
4040
| Dice | max,avg,adp,bin | bin | `FmeasureV2`+`DICEHandler` |
4141
| FPR | max,avg,adp,bin | bin | `FmeasureV2`+`FPRHandler` |
@@ -49,20 +49,6 @@
4949
| TNR | max,avg,adp,bin | bin | `FmeasureV2`+`TNRHandler` |
5050
| TPR | max,avg,adp,bin | bin | `FmeasureV2`+`TPRHandler` |
5151

52-
## [范的 Matlab 代码](https://github.com/DengPingFan/CODToolbox)的比较
53-
54-
在我们的测试中 (测试代码可见`test`文件夹下内容),结果与 Fan 的代码一致,如下:
55-
56-
```text
57-
ours: Smeasure:0.903; wFmeasure:0.558; MAE:0.037; adpEm:0.941; meanEm:0.957; maxEm:0.967; adpFm:0.582; meanFm:0.577; maxFm:0.589
58-
matlab: Smeasure:0.903; wFmeasure:0.558; MAE:0.037; adpEm:0.941; meanEm:0.957; maxEm:0.967; adpFm:0.582; meanFm:0.577; maxFm:0.589.
59-
```
60-
61-
**注意**
62-
63-
- matlab 代码需要将<https://github.com/DengPingFan/CODToolbox/blob/910358910c7824a4237b0ea689ac9d19d1958d11/Onekey_Evaluation_Code/OnekeyEvaluationCode/main.m#L102>`Bi_sal(sal>threshold)=1;`改为` Bi_sal(sal>=threshold)=1;`。细节可见 [相关讨论](https://github.com/DengPingFan/CODToolbox/issues/1)
64-
- 2021-12-20 (Version `1.3.0`):由于 numpy 和 matlab 的不同,在 `1.2.x` 版本中,matlab 代码的结果与我们的结果在某些指标上存在非常细微的差异。[最近的 PR](https://github.com/lartpang/PySODMetrics/pull/3) 缓解了这个问题。但是,在 E-measure 上仍然存在非常小的差异。大多数论文中的结果都四舍五入到三四位有效数字,因此,新版本与“1.2.x”版本之间没有明显差异。
65-
6652
## 使用
6753

6854
核心文件在文件夹 `py_sod_metrics` 中。
@@ -77,8 +63,9 @@ matlab: Smeasure:0.903; wFmeasure:0.558; MAE:0.037; adpEm:0.941; meanEm:0.957; m
7763

7864
## 参考
7965

80-
- <https://github.com/DengPingFan/CODToolbox>
81-
- By DengPingFan(<https://github.com/DengPingFan>)
66+
- [Matlab Code](https://github.com/DengPingFan/CODToolbox) by DengPingFan(<https://github.com/DengPingFan>): 在我们的测试中 (测试代码可见`test`文件夹下内容),结果与 Fan 的代码一致。
67+
- matlab 代码需要将<https://github.com/DengPingFan/CODToolbox/blob/910358910c7824a4237b0ea689ac9d19d1958d11/Onekey_Evaluation_Code/OnekeyEvaluationCode/main.m#L102>`Bi_sal(sal>threshold)=1;`改为` Bi_sal(sal>=threshold)=1;`。细节可见 [相关讨论](https://github.com/DengPingFan/CODToolbox/issues/1)
68+
- 2021-12-20 (Version `1.3.0`):由于 numpy 和 matlab 的不同,在 `1.2.x` 版本中,matlab 代码的结果与我们的结果在某些指标上存在非常细微的差异。[最近的 PR](https://github.com/lartpang/PySODMetrics/pull/3) 缓解了这个问题。但是,在 E-measure 上仍然存在非常小的差异。大多数论文中的结果都四舍五入到三四位有效数字,因此,新版本与“1.2.x”版本之间没有明显差异。
8269
- <https://en.wikipedia.org/wiki/Precision_and_recall>
8370

8471
```text

0 commit comments

Comments
 (0)