コード例 #1
0
ファイル: shape.py プロジェクト: dhlab-epfl/dhSegment-torch
 def normalize_coords(self, image_size: ImageSize):
     if self.normalized_coords:
         return
     self.center = convert_coord_to_normalized(
         self.center, image_size.height, image_size.width
     )
     self.radiuses = convert_coord_to_normalized(
         self.radiuses, image_size.height, image_size.width
     )
     self.normalized_coords = True
コード例 #2
0
ファイル: shape.py プロジェクト: dhlab-epfl/dhSegment-torch
 def normalize_coords(self, image_size: ImageSize):
     if self.normalized_coords:
         return
     self.corner1 = convert_coord_to_normalized(
         self.corner1, image_size.height, image_size.width
     )
     self.corner2 = convert_coord_to_normalized(
         self.corner2, image_size.height, image_size.width
     )
     self.normalized_coords = True
コード例 #3
0
ファイル: shape.py プロジェクト: dhlab-epfl/dhSegment-torch
 def normalize_coords(self, image_size: ImageSize):
     if self.normalized_coords:
         return
     self.coordinates = [
         convert_coord_to_normalized(coords, image_size.height, image_size.width)
         for coords in self.coordinates
     ]
     self.normalized_coords = True