Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
yuweihao authored Apr 29, 2020
1 parent d40393e commit 8ad99f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ You could also run ./scripts/pretrain_detector.sh to train detector by yourself.


# Evaluation metrics
In validation/test dataset, assume there are <img src="https://latex.codecogs.com/gif.latex?Y" /> images. For each image, a model generates top <img src="https://latex.codecogs.com/gif.latex?X" /> predicted relationship triplets. As for image <img src="https://render.githubusercontent.com/render/math?math=I_{y}" />, there are <img src="https://latex.codecogs.com/gif.latex?G_{y}" /> ground truth relationship triplets, where <img src="https://latex.codecogs.com/gif.latex?T_{y}^{X}" /> triplets are predicted successfully by the model. We can calculate:
In validation/test dataset, assume there are <img src="https://render.githubusercontent.com/render/math?math=Y" /> images. For each image, a model generates top <img src="https://render.githubusercontent.com/render/math?math=X" /> predicted relationship triplets. As for image <img src="https://render.githubusercontent.com/render/math?math=I_{y}" />, there are <img src="https://render.githubusercontent.com/render/math?math=G_{y}" /> ground truth relationship triplets, where <img src="https://render.githubusercontent.com/render/math?math=T_{y}^{X}" /> triplets are predicted successfully by the model. We can calculate:

<img src="https://latex.codecogs.com/gif.latex?R@X=\frac{1}{Y}\sum_{y=1}^{Y}\frac{T_y^X}{G_y}." />
<img src="https://render.githubusercontent.com/render/math?math=R@X=\frac{1}{Y}\sum_{y=1}^{Y}\frac{T_y^X}{G_y}." />


For image <img src="https://latex.codecogs.com/gif.latex?I_{y}" />, in its <img src="https://latex.codecogs.com/gif.latex?G_{y}" /> ground truth relationship triplets, there are <img src="https://latex.codecogs.com/gif.latex?G_{yk}" /> ground truth triplets with relationship <img src="https://latex.codecogs.com/gif.latex?k" /> (Except <img src="https://latex.codecogs.com/gif.latex?k=1" />, meaning no relationship. The number of relationship classes is <img src="https://latex.codecogs.com/gif.latex?K" />, including no relationship), where <img src="https://latex.codecogs.com/gif.latex?T_{yk}^X" /> triplets are predicted successfully by the model. In <img src="https://latex.codecogs.com/gif.latex?Y" /> images of validation/test dataset, for relationship <img src="https://latex.codecogs.com/gif.latex?k" />, there are <img src="https://latex.codecogs.com/gif.latex?Y_{k}" /> images which contain at least one ground truth triplet with this relationship. The R@X of relationship <img src="https://latex.codecogs.com/gif.latex?k" /> can be calculated:
For image <img src="https://render.githubusercontent.com/render/math?math=I_{y}" />, in its <img src="https://render.githubusercontent.com/render/math?math=G_{y}" /> ground truth relationship triplets, there are <img src="https://render.githubusercontent.com/render/math?math=G_{yk}" /> ground truth triplets with relationship <img src="https://render.githubusercontent.com/render/math?math=k" /> (Except <img src="https://render.githubusercontent.com/render/math?math=k=1" />, meaning no relationship. The number of relationship classes is <img src="https://render.githubusercontent.com/render/math?math=K" />, including no relationship), where <img src="https://render.githubusercontent.com/render/math?math=T_{yk}^X" /> triplets are predicted successfully by the model. In <img src="https://render.githubusercontent.com/render/math?math=Y" /> images of validation/test dataset, for relationship <img src="https://render.githubusercontent.com/render/math?math=k" />, there are <img src="https://render.githubusercontent.com/render/math?math=Y_{k}" /> images which contain at least one ground truth triplet with this relationship. The R@X of relationship <img src="https://render.githubusercontent.com/render/math?math=k" /> can be calculated:


<img src="https://latex.codecogs.com/gif.latex?R@X_k=\frac{1}{Y_k}\sum_{y=1,G_{yk}\neq0}^{Y}\frac{T_{yk}^X}{G_{yk}}." />
<img src="https://render.githubusercontent.com/render/math?math=R@X_k=\frac{1}{Y_k}\sum_{y=1,G_{yk}\neq0}^{Y}\frac{T_{yk}^X}{G_{yk}}." />



Then we can calculate:

<img src="https://latex.codecogs.com/gif.latex?mR@X=\frac{1}{K-1}\sum_{k=2}^{K}R@X_k." />
<img src="https://render.githubusercontent.com/render/math?math=mR@X=\frac{1}{K-1}\sum_{k=2}^{K}R@X_k." />


# Some results
Expand Down

0 comments on commit 8ad99f5

Please sign in to comment.