YOLOX icon indicating copy to clipboard operation
YOLOX copied to clipboard

How can i know the all information of YOLOX evalution, such as TP,FP,FN,Prcision,Recall,etc?

Open huchi00057 opened this issue 2 years ago • 22 comments

I have changed parameters in coco_evaluator.py ,voc_eval.py and voc_evaluator.py, but there's still no something i wanna get...

like follwing pic I assigned a .txt to store the information, but it failed...I really have noooo idea how to resolve my issue.

image

huchi00057 avatar May 14 '22 05:05 huchi00057

I mean mAP is not enough to my experiment, i wanna get tp,fp,fn, precision,recall and AP of each classes.

image

huchi00057 avatar May 14 '22 05:05 huchi00057

and store it like that:

image

huchi00057 avatar May 14 '22 05:05 huchi00057

Evaluation in yolox coco only contains Precision, recall and mAP. You need to write your own code to get the value of TP,FP,FN.

FateScript avatar May 17 '22 07:05 FateScript

up

zogojogo avatar Jun 17 '22 10:06 zogojogo

@FateScript @Joker316701882 How can i print the precision and recall values? please help needed

yolor2 avatar Jun 21 '22 07:06 yolor2

@yolor2 functions named per_class_AR_table and per_class_AP_table in yolox.evaluator might help you.

FateScript avatar Jun 22 '22 03:06 FateScript

@FateScript So in voc_eval.py I get my recall value in np.ndarray type. And to get the recall/precision values I just need to mean the array?

zogojogo avatar Jun 22 '22 15:06 zogojogo

yolox.zip

I just modify two files. One of that name coco_evaluator.py is located at yolox/yolox/evaluators, and the other is located at yolox/yolox/fast_coco_eval_api.py

You can try it.

huchi00057 avatar Jun 29 '22 06:06 huchi00057

Hello, I have the same needs as yours, I need information such as TP, FP, FN, TN, so can you tell me how to modify the file, thank you

Yifei-Bi avatar Aug 15 '22 17:08 Yifei-Bi

TypeError: evaluate() got an unexpected keyword argument 'return_outputs How to solve this problem thanks

Yifei-Bi avatar Aug 15 '22 17:08 Yifei-Bi

yolox.zip

I just modify two files.

One of that name coco_evaluator.py is located at yolox/yolox/evaluators, and the other is located at yolox/yolox/fast_coco_eval_api.py

You can try it.

I think I wrote the wrong folder,sorry! The correct path is that:

1⃣️ yolox/evaluators/coco_evaluator.py 2⃣️ yolox/layers/fast_coco_eval.api.py

huchi00057 avatar Aug 16 '22 07:08 huchi00057

yolox.zip I just modify two files. One of that name coco_evaluator.py is located at yolox/yolox/evaluators, and the other is located at yolox/yolox/fast_coco_eval_api.py You can try it.

I think I wrote the wrong folder,sorry! The correct path is that:

1⃣️ yolox/evaluators/coco_evaluator.py 2⃣️ yolox/layers/fast_coco_eval.api.py

ok,I found this problem and solved it, but a new problem arose AttributeError: 'bool' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.

Yifei-Bi avatar Aug 16 '22 07:08 Yifei-Bi

约洛克斯.zip 我只是修改了两个文件。 其中一个名称coco_evaluator.py位于yolox/yolox/evaluators,另一个位于yolox/yolox/fast_coco_eval_api.py 你可以试试。

我想我写错了文件夹,对不起!正确的路径是:

1⃣️ yolox/评估员/coco_evaluator.py 2⃣️ yolox/layers/fast_coco_eval.api.py

By the way, I actually run it on Google's colab

Yifei-Bi avatar Aug 16 '22 07:08 Yifei-Bi

https://www.796t.com/content/1549239487.html

I think this article can figure out your problem!

huchi00057 avatar Aug 16 '22 07:08 huchi00057

https://www.796t.com/content/1549239487.html

I think this article can figure out your problem!

我想再次詢問您的test.json文件是什麼

Yifei-Bi avatar Aug 16 '22 08:08 Yifei-Bi

它是個存放訓練集的一個檔案,如圖所示 image

你可以參考此文了解資料集的常見格式 https://github.com/huchi00057/Dataset

huchi00057 avatar Aug 16 '22 10:08 huchi00057

它是個存放訓練集的一個檔案,如圖所示 image

你可以參考此文了解資料集的常見格式 https://github.com/huchi00057/Dataset

我這邊還是報錯,可否把數據集給您,幫我訓練一下,有償請您説明。 實在是需要TP,FP等結果

Yifei-Bi avatar Aug 17 '22 14:08 Yifei-Bi

OK, i'll do my best.

huchi00057 avatar Aug 20 '22 06:08 huchi00057

OK, i'll do my best.

根据您的代码,最后输出的结果是什么?FP,TP等值直接与map这些一起输出吗?

Yifei-Bi avatar Aug 20 '22 09:08 Yifei-Bi

约洛克斯.zip 我只是修改了两个文件。 其中一个名称coco_evaluator.py位于yolox/yolox/evaluators,另一个位于yolox/yolox/fast_coco_eval_api.py 你可以试试。

我想我写错了文件夹,对不起!正确的路径是: 1⃣️ yolox/评估员/coco_evaluator.py 2⃣️ yolox/layers/fast_coco_eval.api.py

By the way, I actually run it on Google's colab

除了这两个文件,其他的文件没有更改的吗?

Yifei-Bi avatar Aug 20 '22 09:08 Yifei-Bi

OK, i'll do my best.

根据您的代码,最后输出的结果是什么?FP,TP等值直接与map这些一起输出吗?

是的!! image

huchi00057 avatar Aug 21 '22 07:08 huchi00057

@szybyf You can share the dataset with me, maybe i can try.

huchi00057 avatar Aug 23 '22 04:08 huchi00057

Sorry for interpretin your talk. When I tried your coco evaluator, the number of results of FP is unbelivable. ` per class tp @0.50:

class # class # class #
Can 280.000 Bottle 926.000 Box 172.000
Cigarette 530.000
per class fp @0.50:
class # class # class #
:---------- :--------- :-------- :--------- :-------- :--------
Can 1408.000 Bottle 2618.000 Box 860.000
Cigarette 4772.000
per class fn @0.50:
class # class # class #
:---------- :------- :-------- :------- :-------- :------
Can 7.000 Bottle 15.000 Box 7.000
Cigarette 15.000

` So, Would you tell me how to calc fp in your code? I'm trying to figure out your code now. Thank you in advance.

ryotaro137 avatar Nov 14 '22 05:11 ryotaro137