gatesla commited on
Commit
a2d536f
1 Parent(s): d888ff9

About to start try add this to the website

Browse files
Files changed (2) hide show
  1. interpretter_notes.py +15 -0
  2. understand.py +6 -0
interpretter_notes.py CHANGED
@@ -140,3 +140,18 @@ array([[1907, 887],
140
  >>> cv.boundingRect(c[1])
141
  (409, 300, 130, 93)
142
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  >>> cv.boundingRect(c[1])
141
  (409, 300, 130, 93)
142
  """
143
+
144
+ """
145
+ for r in results["segments_info"]:
146
+ ... current_id = r["id"]
147
+ ... c, _ = contour_map(results["segmentation"], current_id)
148
+ ... print(f"id {current_id}, label = {model.config.id2label[r['label_id']]}({r['label_id']}) -- {len(c)}")
149
+ """
150
+
151
+ """
152
+ def quick_function(id_number):
153
+ ... c, _ = contour_map(results["segmentation"], id_number)
154
+ ... print(f'{model.config.id2label[results["segments_info"][id_number-1]["label_id"]]}, {results["segments_info"][id_number -1]["score"]}, Contour Count: {len(c)}')
155
+ ... show_mask_for_number_over_image(results["segmentation"],id_number, TEST_IMAGE)
156
+ ...
157
+ """
understand.py CHANGED
@@ -230,3 +230,9 @@ def map_bounding_box_draw(map_to_use, label_id, img_obj=TEST_IMAGE, v="cv"):
230
  plt.imshow(img_obj)
231
  plt.imshow(visual_mask, alpha=0.25)
232
  plt.show(block=False)
 
 
 
 
 
 
 
230
  plt.imshow(img_obj)
231
  plt.imshow(visual_mask, alpha=0.25)
232
  plt.show(block=False)
233
+
234
+
235
+ def manual_looking(id_number):
236
+ c, _ = contour_map(results["segmentation"], id_number)
237
+ print(f'{model.config.id2label[results["segments_info"][id_number-1]["label_id"]]}, {results["segments_info"][id_number -1]["score"]}, Contour Count: {len(c)}')
238
+ show_mask_for_number_over_image(results["segmentation"],id_number, TEST_IMAGE)