File tree 1 file changed +0
-13
lines changed
1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -170,31 +170,18 @@ def get_auto_annotations():
170
170
raise ValueError ("Invalid JSON data format: 'image_name' not found." )
171
171
172
172
image_annotations = []
173
-
174
173
base_url = request .host_url + "uploads/"
175
-
176
- print (f"Base URL: { base_url } " )
177
174
image_url = base_url + image_name
178
-
179
- print (f"Image URL: { image_url } " )
180
-
181
175
image = load_image_from_url (image_url )
182
-
183
176
regions = sam_model .predict (image )
184
-
185
177
formatted_regions = format_regions_for_frontend (regions , image_url , image .shape [1 ], image .shape [0 ])
186
-
187
- print (f"Regions: { formatted_regions } " )
188
-
189
178
image_annotations .append (
190
179
{
191
180
"image_name" : image_name ,
192
181
"image_source" : image_url ,
193
182
"regions" : formatted_regions ,
194
183
}
195
184
)
196
-
197
- print (f"Image Annotations: { image_annotations } " )
198
185
return jsonify (image_annotations ), 200
199
186
200
187
except ValueError as ve :
You can’t perform that action at this time.
0 commit comments