MillanK commited on
Commit
30c09ab
·
1 Parent(s): 4dd4700

Revert "coordinate test"

Browse files

This reverts commit 4dd4700a1278d50479f2e991c1f4111cb14b307d.

Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -102,8 +102,7 @@ def parse_coordinates(response, resized_width, resized_height, original_width, o
102
 
103
  # Return as [x1, y1, x2, y2] format for bounding box
104
  # convert the coordinates to the original image size
105
- #return [action_args[0] / resized_width * original_width, action_args[1] / resized_height * original_height, action_args[0] / resized_width * original_width, action_args[1] / resized_height * original_height]
106
- return [action_args[0], action_args[1], action_args[0], action_args[1]]
107
  except Exception as e:
108
  print(f"Error parsing coordinates: {e}\nResponse: {response}")
109
  return None
 
102
 
103
  # Return as [x1, y1, x2, y2] format for bounding box
104
  # convert the coordinates to the original image size
105
+ return [action_args[0] / resized_width * original_width, action_args[1] / resized_height * original_height, action_args[0] / resized_width * original_width, action_args[1] / resized_height * original_height]
 
106
  except Exception as e:
107
  print(f"Error parsing coordinates: {e}\nResponse: {response}")
108
  return None