pip install automlhelper
See example.py
AutoMLHelper(self, bucket_name, csv_path, project_name)
Args:
bucket_name
(int): The name of the bucket utilized in AutoML e.g.: my-bucket-vcm
csv_path
(str): The path where yours CSVs with reference of images and classes of your images. e.g.: csv/
project_name
(str): Your Google Cloud project
AutoMLHelper.tag_performance(self)
Returns tag display_name
and performance object.
Warning: This connection between tag display_name and the performance object is not returned by Google`s API, this method utilizes an alternative way that can stop working at any moment.
Returns: list: (display_name, performance_object)
AutoMLHelper.tag_and_performance(self, key='base_au_prc')
Returns tag display_name
and performance metric.
Args:
key
(str): performance metric of performance object defaults: 'base_au_prc'
Returns: list: (display_name, performance_metric)
AutoMLHelper.best_performing(self, key='base_au_prc', limit=0, reverse=True)
Returns best or worst tags by performance metric.
Args:
key
(str): performance metric of the performance object defaults: 'base_au_prc'
limit
(int): max number of results
reverse (bool): True for best performing, False for worst performing
Returns: list: (display_name, performance_metric)
AutoMLHelper.get_tags(self)
Returns all tags in the last CSV.
Returns: list: display_name
AutoMLHelper.get_examples_of(self, tag_name, limit=10)
Returns examples of tag_name in the last CSV.
Args:
tag_name
(str): tag display_name
limit
(int): max number of results
Returns:
list
: files marked with that tag
AutoMLHelper.predict_gs(self, gs_file)
Returns AutoML predictions on gs_file.
Args:
gs_file
(str): image in the gs bucket e.g.: gs://my-bucket-name/image.jpg
Returns:
list: (display_name
, classification score)