yelusaleng / RRU-Net

Official repository for "RRU-Net: The Ringed Residual U-Net for Image Splicing Forgery Detection" (CVPRW 2019)
107 stars 18 forks source link

F1 score #3

Closed ahuxjz closed 3 years ago

ahuxjz commented 4 years ago

hi,How to get f1 score?

hao297531173 commented 3 years ago

pred->[batch, 1, h, w] target->[batch, 1, h, w] acc_mask = torch.mul(pred, target) pred_sum = torch.sum(pred) target_sum = torch.sum(target) precise = acc_mask / pred_sum recall = acc_mask / target_sum f1 = 2preciserecall / (precise + recall)

hao297531173 commented 3 years ago

你好,请问你的RRUNet里面图像级分类是怎么做的

---Original--- From: "yelusaleng"<notifications@github.com> Date: Tue, Nov 24, 2020 10:24 AM To: "yelusaleng/RRU-Net"<RRU-Net@noreply.github.com>; Cc: "hao297531173"<297531173@qq.com>;"Comment"<comment@noreply.github.com>; Subject: Re: [yelusaleng/RRU-Net] F1 score (#3)

Closed #3.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

yelusaleng commented 3 years ago

这是基于像素的分类,建议能仔细看下原文

hao297531173 notifications@github.com 于2020年12月2日周三 上午8:58写道:

你好,请问你的RRUNet里面图像级分类是怎么做的

---Original--- From: "yelusaleng"<notifications@github.com> Date: Tue, Nov 24, 2020 10:24 AM To: "yelusaleng/RRU-Net"<RRU-Net@noreply.github.com>; Cc: "hao297531173"<297531173@qq.com>;"Comment"< comment@noreply.github.com>; Subject: Re: [yelusaleng/RRU-Net] F1 score (#3)

Closed #3.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/yelusaleng/RRU-Net/issues/3#issuecomment-736917288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHKD5OFMN7SMVA7CL6AR5ALSSWGKPANCNFSM4NM3O6SA .

hao297531173 commented 3 years ago

好的,谢谢

---Original--- From: "yelusaleng"<notifications@github.com> Date: Thu, Dec 3, 2020 00:40 AM To: "yelusaleng/RRU-Net"<RRU-Net@noreply.github.com>; Cc: "hao297531173"<297531173@qq.com>;"Comment"<comment@noreply.github.com>; Subject: Re: [yelusaleng/RRU-Net] F1 score (#3)

这是基于像素的分类,建议能仔细看下原文

hao297531173 <notifications@github.com> 于2020年12月2日周三 上午8:58写道:

> 你好,请问你的RRUNet里面图像级分类是怎么做的 > > > > ---Original--- > From: "yelusaleng"<notifications@github.com&gt; > Date: Tue, Nov 24, 2020 10:24 AM > To: "yelusaleng/RRU-Net"<RRU-Net@noreply.github.com&gt;; > Cc: "hao297531173"<297531173@qq.com&gt;;"Comment"< > comment@noreply.github.com&gt;; > Subject: Re: [yelusaleng/RRU-Net] F1 score (#3) > > > > > > Closed #3. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub, or unsubscribe. > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <https://github.com/yelusaleng/RRU-Net/issues/3#issuecomment-736917288&gt;, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AHKD5OFMN7SMVA7CL6AR5ALSSWGKPANCNFSM4NM3O6SA&gt; > . >

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

laichou commented 2 years ago

@hao297531173 pred->[batch, 1, h, w] target->[batch, 1, h, w] acc_mask = torch.mul(pred, target) pred_sum = torch.sum(pred) target_sum = torch.sum(target) precise = acc_mask / pred_sum recall = acc_mask / target_sum f1 = 2preciserecall / (precise + recall) 请问想得到这些评价指标,应该把这些代码具体放在哪里?望回复!