streamer-AP / CGNet

Weakly supverised individual counting
28 stars 1 forks source link

problem about "ot_similarity" #2

Closed zaqai closed 2 months ago

zaqai commented 2 months ago

Thanks for your excellent work! When I run your code, I found there is an error about "ot_similarity“. You just imported ot_similarity but didn't define it. In "tri_sim_ot_b" I can't find "ot_similarity ". I also can't find "sim_ot" package.

image_123

streamer-AP commented 2 months ago

Sorry for this mistake. It looks like the function names haven't been aligned. I fix them in this version. You can pull and try it now. It should work well. Or you can just replace 'from .sim_ot import ot_similarity' by 'from .tri_sim_ot_b import GML' replace ot_similarity to GML.

zaqai commented 2 months ago

Thanks a lot! Works for me. btw , | operator needs Python 3.10+ while you use python3.7. It will raise an error. Consider using "Union". https://github.com/streamer-AP/CGNet/blob/bfd0c38346b59e4fa613cf49c4c1f3318f041f9f/tri_dataset.py#L30 https://github.com/streamer-AP/CGNet/blob/bfd0c38346b59e4fa613cf49c4c1f3318f041f9f/tri_dataset.py#L124

streamer-AP commented 2 months ago

Thanks a lot! The recommended Python version is updated according to your advice. :)