{ "info": { "author": "Steven Chand", "author_email": "steven@doc.ai", "bugtrack_url": null, "classifiers": [], "description": "# Imagine Client for Python\n\nThis library allows you to easily connect to doc.ai's Imagine API.\n\n## Supported Image Models\n\nModel Id | Type | Description |\n---------------|-------|-------------|\nphenomenal-face| image | Given a facial image, this model infers the age, sex, height, and weight of a person |\nhappy-face | image | Given a facial image, this model infers the mood of a person |\nmanna | image | Given a food image, this model infers whether the food is healthy/unhealthy |\nface-detector | image | Given an image, this model detects whether a face is present |\nfood-detector | image | Given an image, this model detects whether food is present | \n\n\n## API\n\n```ImageBasedModel.create(imagine_client, model_id)```\n\n> Given an ImagineClient (imagine_client) and string (model_id), creates an image model. See the *\"Supported Image Models\"* section for a list of supported model ids.\n\n```ImageBasedModel.infer(image_file_stream, store=false, metadata=None)```\n\n> Performs the model's inference on an image. A read stream should be passed as the parameter (image_file_stream).\n\n```ImageBasedModel.insert_correction(corrections_dict, metadata=None)```\n\n> Uploads a correction label to the imagine API, for a given inference.\n\n```ImageBasedModel.insert_prediction(predictions_dict, metadata=None)```\n\n> (FOR EDGE PREDICTIONS) Uploads a prediction label to the imagine API, for a given inference.\n\n### Example\n\n```python\n\nfrom imagine_client_py import ImagineClient, ImageBasedModel\n\n# Required parameters\nAPI_KEY = \nIMAGE_PATH = \nCLIENT_ID = \n\n# Initialize imagine client\nimagine_client = ImagineClient({\n 'api_key': API_KEY,\n 'client_id': CLIENT_ID\n})\n\n# Create the 'happy-face' model interface\nmodel = ImageBasedModel.create(imagine_client, 'happy-face')\n\n# Create a read stream to a image file\nwith open(IMAGE_PATH, 'rb') as image_face_file:\n # Perform the model's inference, on the image.\n result = model.infer(image_face_file)\n```\n\n\n##Tests\n\nTo run tests:\n```\nexport IMAGINE_API_KEY= IMAGINE_CLIENT_ID=test\npytest\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/doc-ai/imagine-client-py.git", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "imagine-client-py", "package_url": "https://pypi.org/project/imagine-client-py/", "platform": "", "project_url": "https://pypi.org/project/imagine-client-py/", "project_urls": { "Homepage": "https://github.com/doc-ai/imagine-client-py.git" }, "release_url": "https://pypi.org/project/imagine-client-py/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "A python client for doc.ai's Imagine API", "version": "0.3.0" }, "last_serial": 5608992, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "70c68586e377bb9dd949a7466ea3ad9f", "sha256": "a5346137262ffd400a52127275d8e2710e49d5e3e259f500db2a951567cfb586" }, "downloads": -1, "filename": "imagine_client_py-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "70c68586e377bb9dd949a7466ea3ad9f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5716, "upload_time": "2019-05-08T16:59:17", "url": "https://files.pythonhosted.org/packages/55/6a/75c3ad36394d731185dcc18d079c64269d2274245982ed359818f4f03490/imagine_client_py-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23b51de5a914649806e984512e853d59", "sha256": "c57833e091c4e27d0dd0d0c35604f8d80591f7607cbcf96c4c74bc8054d19abd" }, "downloads": -1, "filename": "imagine-client-py-0.1.0.tar.gz", "has_sig": false, "md5_digest": "23b51de5a914649806e984512e853d59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3590, "upload_time": "2019-05-08T16:59:19", "url": "https://files.pythonhosted.org/packages/d5/e5/63c2f18824582a89baab1aeab733843417b6d5d66025200c532045df9fe7/imagine-client-py-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "849060c104eb3ea3df78df856ab9fc49", "sha256": "28cf237e72724fbbc4278b75f11390dc1b7cd145f399df85ac2866b75ceabd7f" }, "downloads": -1, "filename": "imagine_client_py-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "849060c104eb3ea3df78df856ab9fc49", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6110, "upload_time": "2019-06-03T17:55:27", "url": "https://files.pythonhosted.org/packages/05/75/cdf83dd170dca43629b9a30c1e94fede8dcc731824905a519ccb72b984fd/imagine_client_py-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed7423f30315521078c9cb7904aa820c", "sha256": "543f266e51152b6c8030c17d8688bd1192bf8ca2fa0013f5acbc314c53758f56" }, "downloads": -1, "filename": "imagine-client-py-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ed7423f30315521078c9cb7904aa820c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3931, "upload_time": "2019-06-03T17:55:29", "url": "https://files.pythonhosted.org/packages/0b/57/94fb2457af66aedc80d4c076e5dbd0fd9644051cc6a719ef7f27571c3c9e/imagine-client-py-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "490c2befd04ced51e671fde092a64d65", "sha256": "168d0a86313b86a8974bd5dc0e4d4496922ae673cbb4038c428e49ee0ddefaa7" }, "downloads": -1, "filename": "imagine_client_py-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "490c2befd04ced51e671fde092a64d65", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7290, "upload_time": "2019-07-30T17:38:52", "url": "https://files.pythonhosted.org/packages/6a/c0/e32ef8484db198a1f7d1044181fc14341daf88567de2eae38c5c71d8f9e9/imagine_client_py-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64236a39b9eaf3623098a7949e119b12", "sha256": "c9686cf2d214decc31f588023d49f41f70303e28655a416be1648006e0f58f7e" }, "downloads": -1, "filename": "imagine-client-py-0.3.0.tar.gz", "has_sig": false, "md5_digest": "64236a39b9eaf3623098a7949e119b12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4658, "upload_time": "2019-07-30T17:38:53", "url": "https://files.pythonhosted.org/packages/33/5c/11365d3bd3a2bc0ae6da026e866970f17329b5128aed13faf43426b1d56f/imagine-client-py-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "490c2befd04ced51e671fde092a64d65", "sha256": "168d0a86313b86a8974bd5dc0e4d4496922ae673cbb4038c428e49ee0ddefaa7" }, "downloads": -1, "filename": "imagine_client_py-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "490c2befd04ced51e671fde092a64d65", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7290, "upload_time": "2019-07-30T17:38:52", "url": "https://files.pythonhosted.org/packages/6a/c0/e32ef8484db198a1f7d1044181fc14341daf88567de2eae38c5c71d8f9e9/imagine_client_py-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64236a39b9eaf3623098a7949e119b12", "sha256": "c9686cf2d214decc31f588023d49f41f70303e28655a416be1648006e0f58f7e" }, "downloads": -1, "filename": "imagine-client-py-0.3.0.tar.gz", "has_sig": false, "md5_digest": "64236a39b9eaf3623098a7949e119b12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4658, "upload_time": "2019-07-30T17:38:53", "url": "https://files.pythonhosted.org/packages/33/5c/11365d3bd3a2bc0ae6da026e866970f17329b5128aed13faf43426b1d56f/imagine-client-py-0.3.0.tar.gz" } ] }