hkchengrex / XMem

[ECCV 2022] XMem: Long-Term Video Object Segmentation with an Atkinson-Shiffrin Memory Model
https://hkchengrex.com/XMem/
MIT License
1.72k stars 191 forks source link

Per Frame Confidence Scores during tracking #96

Closed egeozguroglu closed 1 year ago

egeozguroglu commented 1 year ago

Hi, is it possible to retrieve per frame confidence scores during tracking?

hkchengrex commented 1 year ago

You can get the mask probabilities before the argmax here: https://github.com/hkchengrex/XMem/blob/083698bbb4c5ac0ffe1a8923a6c313de46169983/eval.py#L221

egeozguroglu commented 1 year ago

@hkchengrex Thanks, upon further invetigation into XMem's code, the mask probabilities are also returned from step() as a 2 channel H, W tensor:

probs, _ = self.tracker.step(frame_tensor, mask, labels) # logits 2 (bg fg) H W

Could you please clarify what those two channels are - as mentioned in the comment above? What is meant by 2 (bg fg) 2 (bg fg)?

hkchengrex commented 1 year ago

I don't recall seeing that line of code. It is probably probabilities after softmax.