PKU-YuanGroup / LanguageBind

【ICLR 2024🔥】 Extending Video-Language Pretraining to N-modality by Language-based Semantic Alignment
https://arxiv.org/abs/2310.01852
MIT License
549 stars 44 forks source link

Inconsistent running results of inference.py #45

Closed Jade999 closed 2 months ago

Jade999 commented 2 months ago

Hello, Thank you for sharing such a great job! I have encountered some issues where the inference results of the model are inconsistent when I run Python inference.py multiple times。 For example, the first time:

Video x Text: [[1.0000000e+00 3.0187387e-08] [8.4319353e-08 9.9999988e-01]] Image x Text: [[1.0000000e+00 4.0604040e-09] [1.2165047e-08 1.0000000e+00]] Depth x Text: [[0.971602 0.02839794] [0.97326183 0.02673816]] Audio x Text: [[0.99523276 0.00476721] [0.09370264 0.9062974 ]] Thermal x Text: [[0.6276049 0.3723951] [0.6245749 0.3754251]] Video x Audio: [[1.0000000e+00 0.0000000e+00] [3.1131478e-32 1.0000000e+00]] Image x Depth: [[5.2336713e-07 9.9999952e-01] [1.0000000e+00 4.3559140e-08]] Image x Thermal: [[5.1953281e-40 1.0000000e+00] [7.0966505e-27 1.0000000e+00]]

But the second time, we got:

Video x Text:
 [[1.0000000e+00 3.0187387e-08]
 [8.4319353e-08 9.9999988e-01]]
Image x Text:
 [[1.0000000e+00 4.0604040e-09]
 [1.2165047e-08 1.0000000e+00]]
Depth x Text:
 [[0.17767465 0.8223253 ]
 [0.18100499 0.818995  ]]
Audio x Text:
 [[0.99523276 0.00476721]
 [0.09370264 0.9062974 ]]
Thermal x Text:
 [[0.47579706 0.52420294]
 [0.5624282  0.43757182]]
Video x Audio:
 [[1.0000000e+00 0.0000000e+00]
 [3.1131478e-32 1.0000000e+00]]
Image x Depth:
 [[0.9892476  0.01075235]
 [0.9906881  0.00931183]]
Image x Thermal:
 [[9.9999619e-01 3.8228222e-06]
 [1.0000000e+00 1.5902166e-24]]

Why does this randomness occur?

Jade999 commented 2 months ago

请问这个git还有人维护嘛

Jade999 commented 2 months ago

@LinB203

LinB203 commented 2 months ago

抱歉最近忙于别的项目,可能暂时没有时间来管理这个repo。奇怪的是,我觉得应该不会出现这么大的波动。音频有可能波动因为音频是随机采样不同片段。但其他模态我认为不应该波动如此大幅度。

@LinB203

Jade999 commented 2 months ago

是的,所以还请核实一下,我和另外一个朋友都碰到了这个问题

Jade999 commented 2 months ago

可能是某个库的版本不一致,我按照requirement.txt重新安装了一遍所有的库,现在运行结果正确了