Skip to main content

AnaTools

Project Description

Anatools is a python package with modules for developing with the Ana Platform from Rendered.AI. With AnaTools you can generate and access synthetic datasets, and much more!

>>> import anatools
>>> ana = anatools.AnaClient()
'Enter your credentials for Ana.'
'email:' example@rendered.ai
'password:' ***************
>>> ana.get_channels()
['mychannel1', 'mychannel2']
>>> graphs = ana.get_graphs()
>>> datasets = ana.get_datasets()



Install the AnaTools Package

(Optional) Create a new Conda Environment

  1. Install conda for your operating system: https://www.anaconda.com/products/individual.
  2. Create a new conda environment and activate it.
  3. Install anatools from the Python Package Index.
$ conda create -n renderedai python=3.7
$ conda activate renderedai

Install AnaTools to the Python Environment

  1. Install AnaTools from the Python Package Index.
$ pip install anatools

Dependencies

The anatools package requires python 3.6 or higher and has dependencies on the following packages:

Package Description
pyrebase A python wrapper for Google Firebase API.
jwt A python library for encoding and decoding JSON web tokens.
keyring A python library for storing and accessing passwords securely.
docker A python library for the Docker Engine API.
sphinx A python documentation generator.
pytest A python testing framework.
pyyaml A python YAML parser and emitter.

If you have any questions or comments, contact Rendered.AI at info@rendered.ai.



Quickstart Guide

What is Ana?

Ana is a synthetic dataset generation tool where graphs describe what and how synthetic datasets are generated.

Terms Definitions
workspace A workspace is a collection of data used for a particular use-case, for example workspaces can be used to organize data for different projects.
dataset A dataset is a collection of data, for many use-cases these are images with text-based annotation files.
graph A graph is defined by nodes and links, it describes the what and the how a dataset is generated.
node A node can be described as an executable block of code, it has inputs and runs some algorithm to generate outputs.
link A link is used to transfer data from the output of one node, to the input of other nodes.
channel A channel is a collection of nodes, it is used to limit the scope of what is possible to generate in a dataset (like content from a tv channel).

How do you use Ana?

Ana creates synthetic datasets by processing a graph, so we will need to create our Ana client, create a graph, then create a dataset.

  1. Execute the python command line, create a client and login to Ana. In this example we are instantiating a client with no workspace or environment variables, so it is setting our default workspace. To access the tool, you will need to use your email and password for https://deckard.rendered.ai.
>>> import anatools
>>> ana = anatools.AnaClient()
'Enter your credentials for Ana.'
'email:' example@rendered.ai
'password:' ***************
  1. Create a graph file called 'graph.yml' with the code below. We are defining a simplistic graph for this example with multiple cubes dropped into a container. Graphs are usually stored in json or yaml format, but read into a python dictionary to be passed to the API.
nodes:

  Cube:
    class: CubeGenerator

  ObjectPlacement:
    class: RandomPlacement
    inputs: 
      object_generator: {$link: [Cube, object_generator]}
      object_number: '5'

  Container:
    class: ContainerGenerator

  DropObjects:
    class: DropObjectsNode
    inputs:
      objects: {$link: [ObjectPlacement, objects]}
      container_generator: {$link: [Container, object_generator]}
      
  Render:
    class: RenderNode
    inputs:
      frame_number: 150
      target_object: {$link: [DropObjects, target_object]}
      annotated_objects: {$link: [DropObjects, annotated_objects]}
  1. Create a graph using the client. To create a new graph, we load the graph defined above into a python dictionary using the yaml python package. Then we create a graph using the client, this graph is being named 'testgraph' and is using the 'example' channel. The client will return a graphid so we can reference this graph later.
>>> import yaml
>>> with open('graph.yml') as graphfile:
>>>     graph = yaml.safe_load(graphfile)
>>> graphid = ana.create_graph(name='testgraph',channel='example',graph=graph)
>>> graphid
'e175a44e-23a5-11eb-adc1-0242ac120002'
  1. Create a dataset using the client. Using the graphid, we can create a new job to generate a dataset.

The client will return a datasetid that can be used for reference later.

>>> datasetid = ana.create_dataset(name='testdataset',graphid=graphid,interpretations='10',priority='1',seed='1',description='A simple dataset with cubes in a container.')
>>> datasetid
'ce66e81c-23a6-11eb-adc1-0242ac120002 '

Release files for anatools 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anatools 1.0.4
File Size Uploaded
anatools-1.0.4.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anatools 1.0.4
File Interpreter ABI Platform
anatools-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 34.0 kB

Release files / anatools-1.0.4.tar.gz

Download URL anatools-1.0.4.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
afe9ad267efc4d6f0c192566f7337097e29d6249c02abae8c7616492b8d75157
BLAKE2b-256 checksum
How to use checksums
3f93da1859d4ac55ec05a768166905020c78377b20b69af06cfebfaf2fe3f3dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / anatools-1.0.4-py3-none-any.whl

Download URL anatools-1.0.4-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
915d281b9dc57bee62ce4f0e9bdcf91c2218c9ad9628bf783151f9277e83bfb5
BLAKE2b-256 checksum
How to use checksums
47984ecb8329eb41eb75905a2731e350e49f45210befebfc948d995ce3befa9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release history Release notifications | RSS feed

6.1.2

2 release files

6.1.1

2 release files

6.1.0

2 release files

6.0.7

2 release files

6.0.6

2 release files

6.0.5

2 release files

6.0.4

2 release files

6.0.3

2 release files

6.0.2

2 release files

6.0.1

2 release files

6.0.0

2 release files

5.1.27

2 release files

5.1.26

2 release files

5.1.21

2 release files

5.1.20

2 release files

5.1.19

2 release files

5.1.11

2 release files

5.1.10

2 release files

5.1.8

2 release files

5.1.7

2 release files

5.1.6

2 release files

5.1.5

2 release files

5.1.4

2 release files

5.1.3

2 release files

5.1.2

2 release files

5.1.1

2 release files

5.1.0

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.1.9

2 release files

4.1.8

2 release files

4.1.7

2 release files

4.1.6

2 release files

4.1.5

2 release files

4.1.4

2 release files

4.1.3

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.7.3

2 release files

3.7.2

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.16

2 release files

3.5.15

2 release files

3.5.14

2 release files

3.5.13

2 release files

3.5.12

2 release files

3.5.11

2 release files

3.5.10

2 release files

3.5.9

2 release files

3.5.8

2 release files

3.5.7

2 release files

3.5.6

2 release files

3.5.5

2 release files

3.5.4

2 release files

3.5.3

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.9

2 release files

3.4.8

2 release files

3.4.7

2 release files

3.4.5

2 release files

3.4.4

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.4

2 release files

3.3.3

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.0

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page