MCPcopy Create free account
hub / github.com/BICLab/SpikeYOLO / fromarray

Method fromarray

ultralytics/utils/plotting.py:268–271  ·  view source on GitHub ↗

Update self.im from a numpy array.

(self, im)

Source from the content-addressed store, hash-verified

266 cv2.putText(self.im, text, xy, 0, self.sf, txt_color, thickness=self.tf, lineType=cv2.LINE_AA)
267
268 def fromarray(self, im):
269 """Update self.im from a numpy array."""
270 self.im = im if isinstance(im, Image.Image) else Image.fromarray(im)
271 self.draw = ImageDraw.Draw(self.im)
272
273 def result(self):
274 """Return annotated image as array."""

Callers 10

masksMethod · 0.95
kptsMethod · 0.95
plot_imagesFunction · 0.95
detect.pyFile · 0.45
__init__Method · 0.45
plot_labelsFunction · 0.45
save_one_boxFunction · 0.45
forwardMethod · 0.45
_segment_imageMethod · 0.45
_crop_imageMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected