renom_img.api.inference

class Detector ( url='http://localhost' , port='8080' )

Bases: object

This class allows you to pull model which trained on ReNomIMG GUI Tool.

Parameters:
  • url ( string ) – The url ReNomIMG server running.
  • port ( string ) – The port number ReNomIMG server running.
model_info

This function returns information of pulled model.

Example

>>> from renom_img.api.inference.detector import Detector
>>> detector = Detector()
>>> detector.pull()
>>> print(detector.model_info)
predict ( img_list )

Perform prediction to given image.

Parameters: img_list ( string , list , ndarray ) – Path to the image, list of path or ndarray can be passed.

Example

>>> from renom_img.api.inference.detector import Detector
>>> detector = Detector()
>>> detector.pull()
>>> detector.predict(path_to_image)
{
  {'box':[0.2, 0.1, 0.5, 0.3], 'class':0, 'name': 'dog', 'score':0.5}
}
pull ( )

Pull trained weight from ReNomIMG server. Trained weight will be downloaded into current directory.

Example

>>> from renom_img.api.inference.detector import Detector
>>> detector = Detector()
>>> detector.pull()