CogVLM
CogVLM copied to clipboard
Fix IndexError in grounding_parser.py for 2-coordinate bounding boxes
- Handle both 2-coordinate points [x,y] and 4-coordinate boxes [x1,y1,x2,y2]
- Convert 2-coordinate points to small bounding boxes around the point
- Add validation to skip invalid coordinate formats with warnings
- Fix IndexError: list index out of range when model outputs 2 coordinates
- Maintain backward compatibility with existing 4-coordinate functionality
Resolves grounding coordinate parsing issues in GUI agent tasks