IDEA-Research / GroundingDINO

[ECCV 2024] Official implementation of the paper "Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detection"
https://arxiv.org/abs/2303.05499
Apache License 2.0
6.9k stars 699 forks source link

fix: eval empty token_spans properly #191

Closed KazutoMurase closed 1 year ago

KazutoMurase commented 1 year ago

eval accepts only string. When token_spans is None, it should be converted to string as well. (Otherwise, the following error occurs.)

TypeError: eval() arg 1 must be a string, bytes or code object