Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.tensorflow.image_processing Namespace Reference

Classes

class  TensorFlowImageProcessor
 

Functions

def get_model_detection_function (model)
 
None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 AREA_SCHEMA
 
string ATTR_MATCHES = "matches"
 
string ATTR_PROCESS_TIME = "process_time"
 
string ATTR_SUMMARY = "summary"
 
string ATTR_TOTAL_MATCHES = "total_matches"
 
 CATEGORY_SCHEMA
 
string CONF_AREA = "area"
 
string CONF_BOTTOM = "bottom"
 
string CONF_CATEGORIES = "categories"
 
string CONF_CATEGORY = "category"
 
string CONF_FILE_OUT = "file_out"
 
string CONF_GRAPH = "graph"
 
string CONF_LABEL_OFFSET = "label_offset"
 
string CONF_LABELS = "labels"
 
string CONF_LEFT = "left"
 
string CONF_MODEL_DIR = "model_dir"
 
string CONF_RIGHT = "right"
 
string CONF_TOP = "top"
 
string DOMAIN = "tensorflow"
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for performing TensorFlow classification on images.

Function Documentation

◆ get_model_detection_function()

def homeassistant.components.tensorflow.image_processing.get_model_detection_function (   model)
Get a tf.function for detection.

Definition at line 90 of file image_processing.py.

◆ setup_platform()

None homeassistant.components.tensorflow.image_processing.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the TensorFlow image processing platform.

Definition at line 104 of file image_processing.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.tensorflow.image_processing._LOGGER = logging.getLogger(__name__)
private

Definition at line 38 of file image_processing.py.

◆ AREA_SCHEMA

homeassistant.components.tensorflow.image_processing.AREA_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_BOTTOM, default=1): cv.small_float,
4  vol.Optional(CONF_LEFT, default=0): cv.small_float,
5  vol.Optional(CONF_RIGHT, default=1): cv.small_float,
6  vol.Optional(CONF_TOP, default=0): cv.small_float,
7  }
8 )

Definition at line 58 of file image_processing.py.

◆ ATTR_MATCHES

string homeassistant.components.tensorflow.image_processing.ATTR_MATCHES = "matches"

Definition at line 40 of file image_processing.py.

◆ ATTR_PROCESS_TIME

string homeassistant.components.tensorflow.image_processing.ATTR_PROCESS_TIME = "process_time"

Definition at line 43 of file image_processing.py.

◆ ATTR_SUMMARY

string homeassistant.components.tensorflow.image_processing.ATTR_SUMMARY = "summary"

Definition at line 41 of file image_processing.py.

◆ ATTR_TOTAL_MATCHES

string homeassistant.components.tensorflow.image_processing.ATTR_TOTAL_MATCHES = "total_matches"

Definition at line 42 of file image_processing.py.

◆ CATEGORY_SCHEMA

homeassistant.components.tensorflow.image_processing.CATEGORY_SCHEMA
Initial value:
1 = vol.Schema(
2  {vol.Required(CONF_CATEGORY): cv.string, vol.Optional(CONF_AREA): AREA_SCHEMA}
3 )

Definition at line 67 of file image_processing.py.

◆ CONF_AREA

string homeassistant.components.tensorflow.image_processing.CONF_AREA = "area"

Definition at line 45 of file image_processing.py.

◆ CONF_BOTTOM

string homeassistant.components.tensorflow.image_processing.CONF_BOTTOM = "bottom"

Definition at line 46 of file image_processing.py.

◆ CONF_CATEGORIES

string homeassistant.components.tensorflow.image_processing.CONF_CATEGORIES = "categories"

Definition at line 47 of file image_processing.py.

◆ CONF_CATEGORY

string homeassistant.components.tensorflow.image_processing.CONF_CATEGORY = "category"

Definition at line 48 of file image_processing.py.

◆ CONF_FILE_OUT

string homeassistant.components.tensorflow.image_processing.CONF_FILE_OUT = "file_out"

Definition at line 49 of file image_processing.py.

◆ CONF_GRAPH

string homeassistant.components.tensorflow.image_processing.CONF_GRAPH = "graph"

Definition at line 50 of file image_processing.py.

◆ CONF_LABEL_OFFSET

string homeassistant.components.tensorflow.image_processing.CONF_LABEL_OFFSET = "label_offset"

Definition at line 52 of file image_processing.py.

◆ CONF_LABELS

string homeassistant.components.tensorflow.image_processing.CONF_LABELS = "labels"

Definition at line 51 of file image_processing.py.

◆ CONF_LEFT

string homeassistant.components.tensorflow.image_processing.CONF_LEFT = "left"

Definition at line 53 of file image_processing.py.

◆ CONF_MODEL_DIR

string homeassistant.components.tensorflow.image_processing.CONF_MODEL_DIR = "model_dir"

Definition at line 54 of file image_processing.py.

◆ CONF_RIGHT

string homeassistant.components.tensorflow.image_processing.CONF_RIGHT = "right"

Definition at line 55 of file image_processing.py.

◆ CONF_TOP

string homeassistant.components.tensorflow.image_processing.CONF_TOP = "top"

Definition at line 56 of file image_processing.py.

◆ DOMAIN

string homeassistant.components.tensorflow.image_processing.DOMAIN = "tensorflow"

Definition at line 37 of file image_processing.py.

◆ PLATFORM_SCHEMA

homeassistant.components.tensorflow.image_processing.PLATFORM_SCHEMA
Initial value:
1 = IMAGE_PROCESSING_PLATFORM_SCHEMA.extend(
2  {
3  vol.Optional(CONF_FILE_OUT, default=[]): vol.All(cv.ensure_list, [cv.template]),
4  vol.Required(CONF_MODEL): vol.Schema(
5  {
6  vol.Required(CONF_GRAPH): cv.isdir,
7  vol.Optional(CONF_AREA): AREA_SCHEMA,
8  vol.Optional(CONF_CATEGORIES, default=[]): vol.All(
9  cv.ensure_list, [vol.Any(cv.string, CATEGORY_SCHEMA)]
10  ),
11  vol.Optional(CONF_LABELS): cv.isfile,
12  vol.Optional(CONF_LABEL_OFFSET, default=1): int,
13  vol.Optional(CONF_MODEL_DIR): cv.isdir,
14  }
15  ),
16  }
17 )

Definition at line 71 of file image_processing.py.