Coretex
coretex.coretex.sample.image_segmentation_sample.image_segmentation_sample.ImageSegmentationSample Class Reference
Inheritance diagram for coretex.coretex.sample.image_segmentation_sample.image_segmentation_sample.ImageSegmentationSample:
coretex.coretex.sample.image_sample.image_sample.ImageSample coretex.coretex.sample.network_sample.NetworkSample coretex.coretex.sample.image_sample.image_sample_data.AnnotatedImageSampleData coretex.coretex.sample.image_sample.local_image_sample.LocalImageSample coretex.coretex.sample.sample.Sample coretex.coretex.sample.local_sample.LocalSample coretex.coretex.sample.image_sample.image_sample_data.AnnotatedImageSampleData coretex.coretex.sample.sample.Sample

Public Member Functions

Optional[Self] createImageSegmentationSample (cls, int datasetId, Union[Path, str] imagePath)
 
- Public Member Functions inherited from coretex.coretex.sample.image_sample.image_sample.ImageSample
bool saveAnnotation (self, CoretexImageAnnotation coretexAnnotation)
 
Optional[Self] createImageSample (cls, int datasetId, Union[Path, str] imagePath)
 
- Public Member Functions inherited from coretex.coretex.sample.network_sample.NetworkSample
str path (self)
 
str zipPath (self)
 
bool download (self, bool ignoreCache=False)
 
- Public Member Functions inherited from coretex.coretex.sample.sample.Sample
None unzip (self, bool ignoreCache=False)
 
Path joinPath (self, Union[Path, str] other)
 
- Public Member Functions inherited from coretex.coretex.sample.image_sample.image_sample_data.AnnotatedImageSampleData
np.ndarray extractSegmentationMask (self, ImageDatasetClasses classes)
 
- Public Member Functions inherited from coretex.coretex.sample.image_sample.local_image_sample.LocalImageSample
AnnotatedImageSampleData load (self)
 
- Public Member Functions inherited from coretex.coretex.sample.local_sample.LocalSample
str path (self)
 
str zipPath (self)
 
bool download (self, bool ignoreCache=False)
 

Detailed Description

    Represents sample linked to task of type Image Segmentation from Coretex.ai

Definition at line 25 of file image_segmentation_sample.py.

Member Function Documentation

◆ createImageSegmentationSample()

Optional[Self] coretex.coretex.sample.image_segmentation_sample.image_segmentation_sample.ImageSegmentationSample.createImageSegmentationSample (   cls,
int  datasetId,
Union[Path, str]  imagePath 
)
    Creates a new sample from the provided path and adds sample to specified dataset

    Parameters
    ----------
    datasetId : int
id of dataset to which sample will be added
    imagePath : Union[Path, str]
path to the sample

    Returns
    -------
    Optional[Self] -> The created sample object or None if creation failed

    Example
    -------
    >>> from coretex import ImageSegmentationSample
    \b
    >>> sample = ImageSegmentationSample.createImageSegmentationSample(1023, "path/to/file.jpeg")
    >>> if sample is None:
    print("Failed to create image segmentation sample")

Definition at line 32 of file image_segmentation_sample.py.

32  def createImageSegmentationSample(cls, datasetId: int, imagePath: Union[Path, str]) -> Optional[Self]:
33  """
34  Creates a new sample from the provided path and adds sample to specified dataset
35 
36  Parameters
37  ----------
38  datasetId : int
39  id of dataset to which sample will be added
40  imagePath : Union[Path, str]
41  path to the sample
42 
43  Returns
44  -------
45  Optional[Self] -> The created sample object or None if creation failed
46 
47  Example
48  -------
49  >>> from coretex import ImageSegmentationSample
50  \b
51  >>> sample = ImageSegmentationSample.createImageSegmentationSample(1023, "path/to/file.jpeg")
52  >>> if sample is None:
53  print("Failed to create image segmentation sample")
54  """
55 
56  return cls.createImageSample(datasetId, imagePath)

The documentation for this class was generated from the following file: