utils¶
Functions
|
|
|
|
|
|
|
Get labeling job url. |
|
Get summary statistics about given Labeling Jobs images. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get statistics about Labeling Jobs items. |
|
Get summary statistics about given Labeling Jobs. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
utilities used for labeling jobs
- accepted_items_count(job_info)[source]¶
- Returns
Number of accepted images in all Labeling Jobs
- Return type
- accepted_items_count_desc()[source]¶
- Returns
Description about total number of accepted items in all Labeling Jobs
- Return type
Tuple[str, str]
- get_job_url(server_address, job)[source]¶
Get labeling job url.
- Parameters
- server_address : str
Server address there labeling job working.
- job : NamedTuple
Information about labeling job.
- Returns
Labeling job url
- Return type
- Usage example
address = 'https://app.supervise.ly' os.environ['SERVER_ADDRESS'] = address os.environ['API_TOKEN'] = 'Your Supervisely API Token' api = sly.Api.from_env() job_info = api.labeling_job.get_info_by_id(2) from supervisely.labeling_jobs.utils import get_job_url job_url = get_job_url(address, job_info) print(job_url) # Output: https://app.supervise.ly/app/images/4/8/58/54?jobId=2
- images_summary(jobs)[source]¶
Get summary statistics about given Labeling Jobs images.
- Parameters
- jobs : List[NamedTuple]
List of information about Labeling Jobs.
- Returns
Statistics about Labeling Jobs images
- Return type
pd.DataFrame
- Usage example
os.environ['SERVER_ADDRESS'] = 'https://app.supervisely.com' os.environ['API_TOKEN'] = 'Your Supervisely API Token' api = sly.Api.from_env() job_info1 = api.labeling_job.get_info_by_id(2) job_info2 = api.labeling_job.get_info_by_id(3) from supervisely.labeling_jobs.utils import images_summary result = images_summary([job_info1, job_info2]) print(result) # Output: # # ITEM STATUS QUANTITY PERCENTAGE DESCRIPTION # 0 0 TOTAL 5 100.00 % the total number of items in all labeling jobs # 1 1 LABELED 5 100.00 % the total number of labeled items (labelers ma... # 2 2 REVIEWED 5 100.00 % the total number of reviewed items (reviewers ... # 3 3 ACCEPTED 4 80.00 % the total number of accepted items (reviewers ... # 4 4 REJECTED 1 20.00 % the total number of rejected items (reviewers ...
- is_completed(job_info)[source]¶
- Returns
True if Labeling Job is completed, otherwise None
- Return type
bool
orNone
- is_completed_desc()[source]¶
- Returns
Description about total number of completed Labeling Jobs
- Return type
Tuple[str, str]
- is_labeling_started(job_info)[source]¶
- Returns
True if Labeling Job is started, False otherwise
- Return type
- is_labeling_started_desc()[source]¶
- Returns
Description about total number of Labeling Jobs that are started by labeler
- Return type
Tuple[str, str]
- is_not_started(job_info)[source]¶
- Returns
True if Labeling Job is not started, otherwise None
- Return type
bool
orNone
- is_not_started_desc()[source]¶
- Returns
Description about total number of pending Labeling Jobs
- Return type
Tuple[str, str]
- is_on_labeling(job_info)[source]¶
- Returns
True if Labeling Job is in progress, False otherwise
- Return type
- is_on_review(job_info)[source]¶
- Returns
True if Labeling Job is in ‘ON REVIEW’ status , False otherwise
- Return type
- is_on_review_desc()[source]¶
- Returns
Description about number of Labeling Jobs with status ‘ON REVIEW’
- Return type
Tuple[str, str]
- is_review_started(job_info)[source]¶
- Returns
True if Labeling Job is in ‘review’ status and there are Images that reviewer accepted or rejected, False otherwise
- Return type
- is_review_started_desc()[source]¶
- Returns
Description about number of Labeling Jobs that are started by reviewer
- Return type
Tuple[str, str]
- is_stopped(job_info)[source]¶
- Returns
True if Labeling Job is stopped, otherwise None
- Return type
bool
orNone
- is_stopped_desc()[source]¶
- Returns
Description about number of stopped Labeling Jobs
- Return type
Tuple[str, str]
- is_zero_labeling_desc()[source]¶
- Returns
Description about number of Labeling Jobs with status “IN PROGRESS” with zero labeled items
- Return type
Tuple[str, str]
- is_zero_reviewed_desc()[source]¶
- Returns
Description about number of Labeling Jobs with status “ON REVIEW” with zero reviewed items
- Return type
Tuple[str, str]
- jobs_stats(server_address, jobs, stats)[source]¶
Get statistics about Labeling Jobs items.
- Parameters
- Returns
Statistics about Labeling Jobs items as pd.DataFrame
- Return type
pd.DataFrame
- Usage example
os.environ['SERVER_ADDRESS'] = 'https://app.supervisely.com' os.environ['API_TOKEN'] = 'Your Supervisely API Token' api = sly.Api.from_env() job_info1 = api.labeling_job.get_info_by_id(2) job_info2 = api.labeling_job.get_info_by_id(3) address = https://app.supervise.ly from supervisely.labeling_jobs.utils import jobs_stats result = jobs_stats(address, [job_info1, job_info2], [1, 2]) print(result) # Output: # ID NAME STATUS TOTAL LABELED REVIEWED ACCEPTED REJECTED CREATED_AT # 0 2 <a href="https://app.supervise.ly/app/images/... completed 3 3 3 2 1 08/04/2020 15:10 # 1 3 <a href="https://app.supervise.ly/app/images/... completed 2 2 2 2 0 08/04/2020 15:10
- jobs_summary(jobs)[source]¶
Get summary statistics about given Labeling Jobs.
- Parameters
- jobs : List[NamedTuple]
List of information about Labeling Jobs.
- Returns
Statistics about Labeling Jobs as pd.DataFrame
- Return type
pd.DataFrame
- Usage example
os.environ['SERVER_ADDRESS'] = 'https://app.supervisely.com' os.environ['API_TOKEN'] = 'Your Supervisely API Token' api = sly.Api.from_env() job_info1 = api.labeling_job.get_info_by_id(2) job_info2 = api.labeling_job.get_info_by_id(3) from supervisely.labeling_jobs.utils import jobs_summary result = jobs_summary([job_info1, job_info2]) print(result) # Output: # JOB STATUS QUANTITY PERCENTAGE DESCRIPTION # 0 0 TOTAL 2 100.00 % the total number of jobs in current team # 1 1 COMPLETED 2 100.00 % the number of completed jobs # 2 2 STOPPED 0 0.00 % the number of stopped jobs # 3 3 PENDING 0 0.00 % the number of jobs labeler haven't even opened... # 4 4 LABELING IN PROGRESS 0 0.00 % the number of jobs with status IN_PROGRESS # 5 5 LABELING STARTED 0 0.00 % the number of jobs that are started by labeler... # 6 6 ZERO LABELED 0 0.00 % the number of jobs with status "IN PROGRESS" w... # 7 7 ON REVIEW 0 0.00 % the number of jobs with status ON_REVIEW # 8 8 REVIEW STARTED 0 0.00 % the number of jobs that are started by reviewe... # 9 9 ZERO REVIEWED 0 0.00 % the number of jobs with status "ON REVIEW" wit...
- labeled_items_count(job_info)[source]¶
- Returns
Number of Images, that labeler marked as done
- Return type
- labeled_items_count_desc()[source]¶
- Returns
Description about total number of labeled items in all Labeling Jobs
- Return type
Tuple[str, str]
- rejected_items_count(job_info)[source]¶
- Returns
Number of rejected images in all Labeling Jobs
- Return type
- rejected_items_count_desc()[source]¶
- Returns
Description about total number of rejected items in Labeling Jobs
- Return type
Tuple[str, str]
- reviewed_items_count(job_info)[source]¶
- Returns
Number of reviewed Images(accepted and rejected)
- Return type
- reviewed_items_count_desc()[source]¶
- Returns
Description about total number of reviewed items in all Labeling Jobs
- Return type
Tuple[str, str]
- total_desc()[source]¶
- Returns
Description about total number of Labeling Jobs
- Return type
Tuple[str, str]