In some implementations, visual recognition (e.g., facial recognition or object recognition) via neural network requires high processing power and a large amount of memory to run in real-time or near real-time. Techniques for visual recognition via neural network that can run in near real-time with lower processing power or lower memory (e.g., on an edge device, such as a web camera or a mobile phone) may be desirable.
Some embodiments of the technology are illustrated, by way of example and not limitation, in the figures of the accompanying drawings.
The present disclosure generally relates to machines configured to provide neural networks, including computerized variants of such special-purpose machines and improvements to such variants, and to the technologies by which such special-purpose machines become improved compared to other special-purpose machines that provide technology for neural networks. In particular, the present disclosure addresses systems and methods for visual recognition via neural network.
According to some aspects of the technology described herein, a system includes processing hardware and a memory. The memory stores instructions which, when executed by the processing hardware, cause the processing hardware to perform operations. The operations include accessing an input matrix. The operations include processing the input matrix through a plurality of convolution layers, each convolution layer including a convolution layer kernel, to generate a processed matrix, the convolution layer kernel being a first square, a side dimension of the first square being an integer greater than or equal to 2. The operations include processing the processed matrix through at least one squeeze layer, the at least one squeeze layer including a squeeze layer kernel, to generate an output matrix, the squeeze layer kernel being a second square with a side dimension of 1. The operations include providing a representation of the output matrix.
According to some aspects of the technology described herein, a machine-readable medium stores instructions which, when executed by one or more machines, cause the one or more machines to perform operations. The operations include accessing an input matrix. The operations include processing the input matrix through a plurality of convolution layers, each convolution layer including a convolution layer kernel, to generate a processed matrix, the convolution layer kernel being a first square, a side dimension of the first square being an integer greater than or equal to 2. The operations include processing the processed matrix through at least one squeeze layer, the at least one squeeze layer including a squeeze layer kernel, to generate an output matrix, the squeeze layer kernel being a second square with a side dimension of 1. The operations include providing a representation of the output matrix.
According to some aspects of the technology described herein, a method includes accessing an input matrix. The method includes processing the input matrix through a plurality of convolution layers, each convolution layer including a convolution layer kernel, to generate a processed matrix, the convolution layer kernel being a first square, a side dimension of the first square being an integer greater than or equal to 2. The method includes processing the processed matrix through at least one squeeze layer, the at least one squeeze layer including a squeeze layer kernel, to generate an output matrix, the squeeze layer kernel being a second square with a side dimension of 1. The method includes providing a representation of the output matrix.
The present disclosure describes, among other things, methods, systems, and computer program products that individually provide various functionality. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the various aspects of different embodiments of the present disclosure. It will be evident, however, to one skilled in the art, that the present disclosure may be practiced without all of the specific details.
As set forth above, visual recognition (e.g., facial recognition or object recognition) via neural network requires high processing power and a large amount of memory to run in real-time or near real-time. Techniques for visual recognition via neural network that can run in near real-time with lower processing power or lower memory (e.g., on an edge device, such as a web camera or a mobile phone) may be desirable. As used herein, near real-time may include within a threshold time period (e.g., within one second, within 10 seconds, within one minute, within 5 minutes, etc.).
Some aspects of the technology described herein are directed to solving the technical problem of visual recognition in near real-time on an edge device. According to some implementations, the solution includes accessing, using an edge device, an input matrix. The input matrix may represent an input image to which visual recognition is to be applied. The edge device processes the input matrix through a plurality of convolution layers to generate a processed matrix. Each convolution layer includes a convolution layer kernel. The convolution layer kernel is a first square. A side dimension of the first square is an integer greater than or equal to 2. The edge device processes the processed matrix through at least one squeeze layer to generate an output matrix. The squeeze layer includes a squeeze layer kernel. The squeeze layer kernel is a second square with a side dimension of 1. The edge device provides a representation of the output matrix. The output matrix may correspond to an identification of a face or an object in the input image.
The client device 130 may be a laptop computer, a desktop computer, a mobile phone, a tablet computer, a smart television with a processor and a memory, a smart watch, and the like. The client device 130 is coupled with the webcam 135. The webcam may have its own processor(s) and memory, which may be less powerful than those of the full client device 130. The data repository 120 may store a plurality of images, which may be matched to an image captured from the client device 130 using visual recognition technique(s). The data repository 120 may be implemented as a database or any other data storage unit.
In some schemes, the client device 130 captures (e.g., using the webcam 135) an image and provides the captured image to the server 120. The server 120 then applies a visual recognition technique to match the captured image to image(s) stored in the data repository 120. However, these schemes require network access and require usage of a server with high processing power and a large amount of memory. Some techniques described herein allow for visual recognition to take place on an edge device, such as the webcam 135 (or, alternatively, a mobile phone or tablet computer) with limited processing power and memory. For example, the method described in conjunction with
At operation 210, the webcam 135 accesses an input matrix. The input matrix may be stored in a local memory of the webcam 135 and may be accessed by processor(s) of the webcam 135. The input matrix may represent an input image to which visual recognition is to be applied. The input matrix may have a width w, a height h, and a depth cin, where w, h, and cin are positive integers. In some examples, the webcam 135 captures an image to which visual recognition is to be applied and generates the input matrix based on the captured image.
At operation 220, the webcam 135 processes the input matrix through a plurality of convolution layers from a neural network architecture to generate a processed matrix. The neural network architecture may be a preselected convolution neural network. The neural network architecture may be used for facial recognition or other image recognition. Each convolution layer includes a convolution layer kernel having dimensions k*k. In other words, the convolution layer kernel may be a first square with a side dimension of k, where k is an integer greater than or equal to 2. In some cases, the webcam 135, for each convolution layer: for each k*k block in the input matrix, computes a dot product of the weights indicated in the convolution layer kernel and the k*k block. The computed dot product is provided for storage in a matrix to be provided to the next layer.
At operation 230, the webcam 135 processes the processed matrix through squeeze layer(s) to generate an output matrix. The squeeze layer(s) replace at least one convolution layer from the neural network architecture. For example, the squeeze layer(s) may replace the last 1, 2, 3, etc., layers of the neural network architecture. The squeeze layer(s) include a squeeze layer kernel having dimensions 1*1. In other words, the squeeze layer kernel is a second square with a side dimension of 1. In some cases, the squeeze layer(s) include exactly one squeeze layer. Alternatively, the squeeze layer(s) may include multiple squeeze layers. The squeeze layer(s) may follow the plurality of convolution layers. An example of the multiple stages is described below in conjunction with Table 2.
At operation 240, the webcam provides a representation of the output matrix. In some cases, the input matrix (from operation 210) and the output matrix have the same width w, the same height h, and different depths. The depth of the output matrix may be cout, where cout is a positive integer that is different from the depth of the input matrix cin. In some cases, the input matrix corresponds to an image. The output matrix corresponds to an identification, based on data in the data repository 120, of a person or an object depicted in the image. In some cases, the webcam 135 (or the client device 130 or the server 110) identifies, based on the output matrix and information stored in the data repository 120, a person or an object depicted in the image which corresponds to the input matrix.
As shown in
In one example, the convolution layers 310, 320, and 330 are the first three layers of a convolution neural network architecture. The squeeze layer 340 replaces the fourth layer of the convolution neural network architecture, using squeeze technology in place of convolution technology. As a result, a neural network corresponding to the neural network architecture 300 uses less computational resources (e.g., processor(s), memory) than the full convolution neural network architecture, and can be more easily implemented on an edge device.
In some cases, each of the convolution layers 310, 320, and 330 processes its input using a k*k kernel, where k is an integer greater than or equal to 2. A dot product is calculated between the k*k kernel and every k*k block in the input. The squeeze layer 340 processes its input using a 1*1 kernel. One example of the operation of the convolution layers and the squeeze layer is described below in conjunction with Table 2.
According to some embodiments, the final squeeze layer 340 replaces a convolution layer because it uses less processing and memory resources than the convolution layer. Replacing the convolution layer with the squeeze layer 340 allows the diagrammed neural network to run in near real-time on an edge device.
As used herein, the squeeze layer 340 has fewer parameters than the convolution layers 310-330. The squeeze layer 340 accomplishes this by using smaller filters (e.g., 1×1 filters rather than 3×3 filters), decreasing the number of input channels to larger filters, and downsampling late in the network so that the convolution layers have large activation maps. The squeeze layer 340 may include a fire module. The fire module has a squeeze submodule that includes only 1×1 filters and an expand submodule that includes a combination of 1×1 and 3×3 filters. This limits the number of input channels to the larger 3×3 filters. It should be noted that 1×1 and 3×3 filters are used here as examples, and may be replaced with other filter sizes.
Table 1 illustrates an example convolution scheme for visual recognition. In Table 1 and Table 2, w represents the width, h represents the height, d represents the depth, and k represents a side dimension of a kernel square.
Table 2 represents a squeezed approach for visual recognition.
In one example, d is 256, k is 3, n is 512, and m is 64. In this example, the number of convolution operations is w*h*9*256*512. In the squeezed case, the number of operations is w×h×(256×64+64×9×256+64×256), which is much smaller than that for the convolution case.
One idea describe herein is to use the squeezed operation to replace selected layers of a residual network (ResNet). The replacing of selected layers is one feature of the technology described herein.
Some aspects are directed to techniques to build fast and accurate neural network for face recognition on the edge.
The residual neural network (ResNet) has demonstrated cutting-edge performance in terms of visual recognition tasks. The ResNet shares the same core spirit of deep convolutional neural network, which is to process the input image with a stack of sequential operations, while has the unique design of residual operation, shown as
The squeeze layer—SqueezeNet—is used to reduce the number of parameters for the convolutional layer. The intuition of the SqueezeNet is as follows. Suppose the input of a certain convolutional layer is a tensor with the size w×h×d, and this convolutional layer has n filers of the size d×k×k. Then this convolutional layer could be replaced by a module called a “squeeze-expand” block, which has fewer parameters yet similar performance. However, the network structure (all the layers are the “squeeze-expand” block) might. In some cases, not have good performance for face recognition.
A bit more details recaps the fundamental idea of SqueezeNet. The “squeeze-expand” block has two operations. First, a convolutional layer with m filters (m<d, filter size 1×1×d) is applied. This layer is called “squeeze.” Second, another convolutional layer are applied, called “expand.” Since the second (“expand”) layer has the input tensor of the size w×h×m, which is much smaller than the original input, the number of parameters is reduced.
In some implementations, ResNet is used as the backbone model, and the last stage of ResNet is replaced with SqueezeNet to reduce the model size. The classification vector-centered cosine similarity regularization may, in some cases, be applied to further improve the performance.
According to some aspects, there are several technologies involved in a convolution deep neural network-based visual recognition system. In one example, more layers may be added with residual technology. This leads to higher accuracy, but has the downsides of a larger network and slower performance. In another example, squeezing technology is used. This leads to lower accuracy, but has a smaller and faster (in terms of execution time for a given amount of processing and memory resources) network. In some aspects, a regularizer (for example, as described below) improves the accuracy without slowing down the performance. Some aspects are directed to a combination of the residual (e.g. convolution) layer(s), the squeezing layer(s), and the regularization technology.
Some aspects are directed to solving the problem of training a large-scale face identification model with imbalanced training data. This problem naturally exists in many real scenarios including large-scale celebrity recognition, movie actor annotation, and the like. The solution may include building a face feature extraction model, and improving its performance, especially for the persons with very limited training samples, by introducing a regularizer to the cross entropy loss for the multinomial logistic regression (MLR) learning. This regularizer encourages the directions of the face features from the same class to be close to the direction of their corresponding classification weight vector in the logistic regression.
The solution may include representation learning. In representation learning, one builds a face representation model using all the training images from the base set.
Some aspects train the face representation model with a supervised learning framework considering persons' identifiers as class labels. The cost function that is used is shown as Equation 1.
=s+λa Equation 1
In Equation 1, s is the standard cross entropy loss used for a Softmax layer, while a is our proposed loss used to improve the feature discrimination and generalization capability, with the balancing coefficient λ.
More specifically, we recap the first term, cross entropy s as shown in Equation 2.
In Equation 2, tk, n∈{0, 1} is the ground truth label indicating whether the nth image belongs to the kth class, and the term pk(xn) is the estimated probability that the image xn belongs to the kth class, defined as, shown in Equation 3.
In Equation 3, wk is the weight vector for the kth class, and ϕ(⋅) denotes the feature extractor for image xn. Some aspects use a standard residual network with 34 (or another number of) layers as the feature extractor ϕ(⋅), and use the last pooling layer as the face representation. The standard residual network may be used due to its tradeoff between prediction accuracy and model complexity. However, the technique described herein is general enough to be extended to deeper network structures. In some cases, one may set the bias term bk=0. In some cases, removing the bias term from the standard Softmax layer might not affect the performance. However, this may lead to a better understanding of the geometry property of the classification space.
The second term a of the cost function shown in Equation 1 is calculated as shown in Equations 4 and 5.
One may set the parameter vector w′k to be equal to the weight vector wk. This loss term encourages the face features belong to the same class to have similar direction as the associated classification weight vector wkT. This term is called Classification vector-centered Cosine Similarity (CCS) loss. Calculating the derivative with respect to ϕ(xi), results in Equation 6.
In Equation 6, θi,k is the angle between w′k and ϕ(xi). Note that w′k in this term is the parameter copied from wk, so there is no derivative to w′k.
Some aspects use the weight vector in Softmax wk to represent the classification center. In some aspects, wk is updated (naturally during minimizing s) using not only the information from the kth class, but also the information from the other classes. In contrast, ck is updated only using the information from the kth class (calculated separately). More specifically, according to the derivative of the cross entropy loss shown in Equation 2, Equation 7 applies.
Per Equation 7, the direction of wk is close to the direction of the face features from the kth class, and being pushed far away from the directions of the face features not from the kth class.
In sum, according to some implementations, an edge device accesses an input matrix. The edge device processes the input matrix through a plurality of convolution layers, each convolution layer including a convolution layer kernel, to generate a processed matrix. The convolution layer kernel is a first square, a side dimension of the first square being an integer greater than or equal to 2. The edge device processes the processed matrix through at least one squeeze layer, the at least one squeeze layer including a squeeze layer kernel, to generate an output matrix. The squeeze layer kernel is a second square with a side dimension of 1. The edge device provides a representation of the output matrix.
Certain embodiments are described herein as numbered examples 1, 2, 3, etc. These numbered examples are provided as examples only and do not limit the subject technology.
Example 1 is a system comprising: processing hardware; and a memory storing instructions which cause the processing hardware to perform operations comprising: accessing an input matrix; processing the input matrix through a plurality of convolution layers from a neural network architecture, each convolution layer including a convolution layer kernel, to generate a processed matrix, the convolution layer kernel being a first square, a side dimension of the first square being an integer greater than or equal to 2; processing the processed matrix through at least one squeeze layer, the at least one squeeze layer including a squeeze layer kernel, to generate an output matrix, the squeeze layer kernel being a second square with a side dimension of 1, the at least one squeeze layer replacing at least one convolution layer from the neural network architecture; and providing a representation of the output matrix.
In Example 2, the subject matter of Example 1 includes, the operations further comprising: capturing an image; and generating the input matrix based on the captured image.
In Example 3, the subject matter of Example 2 includes, the operations further comprising: identifying, based on the output matrix and information stored in a data repository, a person or an object depicted in the captured image.
In Example 4, the subject matter of Examples 1-3 includes, wherein the at least one squeeze layer comprises exactly one squeeze layer that follows the plurality of convolution layers.
In Example 5, the subject matter of Examples 1-4 includes, wherein the at least one squeeze layer comprises a plurality of squeeze layers.
In Example 6, the subject matter of Examples 1-5 includes, wherein the input matrix and the output matrix have a same width, a same height, and different depths.
In Example 7, the subject matter of Examples 1-6 includes, wherein the side dimension of the first square is k, and wherein processing the input matrix through the plurality of convolution layers comprises, for each convolution layer: for each k*k block in the input matrix, computing a dot product of weights indicated in the convolution layer kernel and the k*k block; and providing the computed dot product for storage in a matrix provided to a next layer.
In Example 8, the subject matter of Examples 1-7 includes, wherein the plurality of convolution layers comprise four stages of convolution layers, and wherein the at least one squeeze layer comprises a single stage of squeeze layer.
In Example 9, the subject matter of Examples 1-8 includes, wherein the processing hardware and the memory reside within an edge device.
Example 10 is a non-transitory machine-readable medium storing instructions which cause one or more machines to perform operations comprising: accessing an input matrix; processing the input matrix through a plurality of convolution layers from a neural network architecture, each convolution layer including a convolution layer kernel, to generate a processed matrix, the convolution layer kernel being a first square, a side dimension of the first square being an integer greater than or equal to 2; processing the processed matrix through at least one squeeze layer, the at least one squeeze layer including a squeeze layer kernel, to generate an output matrix, the squeeze layer kernel being a second square with a side dimension of 1, the at least one squeeze layer replacing at least one convolution layer from the neural network architecture; and providing a representation of the output matrix.
In Example 11, the subject matter of Example 10 includes, wherein the at least one squeeze layer comprises exactly one squeeze layer that follows the plurality of convolution layers.
In Example 12, the subject matter of Examples 10-11 includes, wherein the at least one squeeze layer comprises a plurality of squeeze layers.
In Example 13, the subject matter of Examples 10-12 includes, wherein the input matrix and the output matrix have a same width, a same height, and different depths.
In Example 14, the subject matter of Examples 10-13 includes, wherein the side dimension of the first square is k, and wherein processing the input matrix through the plurality of convolution layers comprises, for each convolution layer: for each k*k block in the input matrix, computing a dot product of weights indicated in the convolution layer kernel and the k*k block; and providing the computed dot product for storage in a matrix provided to a next layer.
In Example 15, the subject matter of Examples 10-14 includes, wherein the plurality of convolution layers comprise four stages of convolution layers, and wherein the at least one squeeze layer comprises a single stage of squeeze layer.
Example 16 is a method comprising: accessing an input matrix stored in memory; processing, at a processing hardware, the input matrix through a plurality of convolution layers from a neural network architecture, each convolution layer including a convolution layer kernel, to generate a processed matrix, the convolution layer kernel being a first square, a side dimension of the first square being an integer greater than or equal to 2; processing, at the processing hardware, the processed matrix through at least one squeeze layer, the at least one squeeze layer including a squeeze layer kernel, to generate an output matrix, the squeeze layer kernel being a second square with a side dimension of 1, the at least one squeeze layer replacing at least one convolution layer from the neural network architecture; and providing, via a computer bus or a network interface, a representation of the output matrix.
In Example 17, the subject matter of Example 16 includes, wherein the at least one squeeze layer comprises exactly one squeeze layer that follows the plurality of convolution layers.
In Example 18, the subject matter of Examples 16-17 includes, wherein the at least one squeeze layer comprises a plurality of squeeze layers.
In Example 19, the subject matter of Examples 16-18 includes, wherein the side dimension of the first square is k, and wherein processing the input matrix through the plurality of convolution layers comprises, for each convolution layer: for each k*k block in the input matrix, computing a dot product of weights indicated in the convolution layer kernel and the k*k block; and providing the computed dot product for storage in a matrix provided to a next layer.
In Example 20, the subject matter of Examples 16-19 includes, wherein the plurality of convolution layers comprise four stages of convolution layers, and wherein the at least one squeeze layer comprises a single stage of squeeze layer.
In Example 21, the subject matter of Examples 16-20 includes, introducing a regularizer to cross entropy loss for multinomial logistic regression (MLR) learning, the regularizer encouraging directions of face features from a same class to be proximate to a direction of a corresponding classification weight vector in a logistic regression.
Example 22 is at least one machine-readable medium including instructions that, when executed by processing circuitry, cause the processing circuitry to perform operations to implement of any of Examples 1-21.
Example 23 is an apparatus comprising means to implement of any of Examples 1-21.
Example 24 is a system to implement of any of Examples 1-21.
Example 25 is a method to implement of any of Examples 1-21.
Certain embodiments are described herein as including logic or a number of components or mechanisms. Components may constitute either software components (e.g., code embodied on a machine-readable medium) or hardware components. A “hardware component” is a tangible unit capable of performing certain operations and may be configured or arranged in a certain physical manner. In various example embodiments, one or more computer systems (e.g., a standalone computer system, a client computer system, or a server computer system) or one or more hardware components of a computer system (e.g., a processor or a group of processors) may be configured by software (e.g., an application or application portion) as a hardware component that operates to perform certain operations as described herein.
In some embodiments, a hardware component may be implemented mechanically, electronically, or any suitable combination thereof. For example, a hardware component may include dedicated circuitry or logic that is permanently configured to perform certain operations. For example, a hardware component may be a special-purpose processor, such as a Field-Programmable Gate Array (FPGA) or an Application Specific Integrated Circuit (ASIC). A hardware component may also include programmable logic or circuitry that is temporarily configured by software to perform certain operations. For example, a hardware component may include software executed by a general-purpose processor or other programmable processor. Once configured by such software, hardware components become specific machines (or specific components of a machine) uniquely tailored to perform the configured functions and are no longer general-purpose processors. It will be appreciated that the decision to implement a hardware component mechanically, in dedicated and permanently configured circuitry, or in temporarily configured circuitry (e.g., configured by software) may be driven by cost and time considerations.
Accordingly, the phrase “hardware component” should be understood to encompass a tangible record, be that an record that is physically constructed, permanently configured (e.g., hardwired), or temporarily configured (e.g., programmed) to operate in a certain manner or to perform certain operations described herein. As used herein, “hardware-implemented component” refers to a hardware component. Considering embodiments in which hardware components are temporarily configured (e.g., programmed), each of the hardware components might not be configured or instantiated at any one instance in time. For example, where a hardware component comprises a general-purpose processor configured by software to become a special-purpose processor, the general-purpose processor may be configured as respectively different special-purpose processors (e.g., comprising different hardware components) at different times. Software accordingly configures a particular processor or processors, for example, to constitute a particular hardware component at one instance of time and to constitute a different hardware component at a different instance of time.
Hardware components can provide information to, and receive information from, other hardware components. Accordingly, the described hardware components may be regarded as being communicatively coupled. Where multiple hardware components exist contemporaneously, communications may be achieved through signal transmission (e.g., over appropriate circuits and buses) between or among two or more of the hardware components. In embodiments in which multiple hardware components are configured or instantiated at different times, communications between such hardware components may be achieved, for example, through the storage and retrieval of information in memory structures to which the multiple hardware components have access. For example, one hardware component may perform an operation and store the output of that operation in a memory device to which it is communicatively coupled. A further hardware component may then, at a later time, access the memory device to retrieve and process the stored output. Hardware components may also initiate communications with input or output devices, and can operate on a resource (e.g., a collection of information).
The various operations of example methods described herein may be performed, at least partially, by one or more processors that are temporarily configured (e.g., by software) or permanently configured to perform the relevant operations. Whether temporarily or permanently configured, such processors may constitute processor-implemented components that operate to perform one or more operations or functions described herein. As used herein, “processor-implemented component” refers to a hardware component implemented using one or more processors.
Similarly, the methods described herein may be at least partially processor-implemented, with a particular processor or processors being an example of hardware. For example, at least some of the operations of a method may be performed by one or more processors or processor-implemented components. Moreover, the one or more processors may also operate to support performance of the relevant operations in a “cloud computing” environment or as a “software as a service” (SaaS). For example, at least some of the operations may be performed by a group of computers (as examples of machines including processors), with these operations being accessible via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., an API).
The performance of certain of the operations may be distributed among the processors, not only residing within a single machine, but deployed across a number of machines. In some example embodiments, the processors or processor-implemented components may be located in a single geographic location (e.g., within a home environment, an office environment, or a server farm). In other example embodiments, the processors or processor-implemented components may be distributed across a number of geographic locations.
The components, methods, applications, and so forth described in conjunction with
Software architectures are used in conjunction with hardware architectures to create devices and machines tailored to particular purposes. For example, a particular hardware architecture coupled with a particular software architecture will create a mobile device, such as a mobile phone, tablet device, or so forth. A slightly different hardware and software architecture may yield a smart device for use in the “internet of things,” while yet another combination produces a server computer for use within a cloud computing architecture. Not all combinations of such software and hardware architectures are presented here, as those of skill in the art can readily understand how to implement the disclosed subject matter in different contexts from the disclosure contained herein.
The machine 500 may include processors 510, memory/storage 530, and I/O components 550, which may be configured to communicate with each other such as via a bus 502. In an example embodiment, the processors 510 (e.g., a Central Processing Unit (CPU), a Reduced Instruction Set Computing (RISC) processor, a Complex Instruction Set Computing (CISC) processor, a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), an ASIC, a Radio-Frequency Integrated Circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, a processor 512 and a processor 514 that may execute the instructions 516. The term “processor” is intended to include multi-core processors that may comprise two or more independent processors (sometimes referred to as “cores”) that may execute instructions contemporaneously. Although
The memory/storage 530 may include a memory 532, such as a main memory, or other memory storage, and a storage unit 536, both accessible to the processors 510 such as via the bus 502. The storage unit 536 and memory 532 store the instructions 516 embodying any one or more of the methodologies or functions described herein. The instructions 516 may also reside, completely or partially, within the memory 532, within the storage unit 536, within at least one of the processors 510 (e.g., within the processor's cache memory), or any suitable combination thereof, during execution thereof by the machine 500. Accordingly, the memory 532, the storage unit 536, and the memory of the processors 510 are examples of machine-readable media.
As used herein, “machine-readable medium” means a device able to store instructions (e.g., instructions 516) and data temporarily or permanently and may include, but is not limited to, random-access memory (RAM), read-only memory (ROM), buffer memory, flash memory, optical media, magnetic media, cache memory, other types of storage (e.g., Erasable Programmable Read-Only Memory (EEPROM)), and/or any suitable combination thereof. The term “machine-readable medium” should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, or associated caches and servers) able to store the instructions 516. The term “machine-readable medium” shall also be taken to include any medium, or combination of multiple media, that is capable of storing instructions (e.g., instructions 516) for execution by a machine (e.g., machine 500), such that the instructions, when executed by one or more processors of the machine (e.g., processors 510), cause the machine to perform any one or more of the methodologies described herein. Accordingly, a “machine-readable medium” refers to a single storage apparatus or device, as well as “cloud-based” storage systems or storage networks that include multiple storage apparatus or devices. The term “machine-readable medium” excludes signals per se.
The I/O components 550 may include a wide variety of components to receive input, provide output, produce output, transmit information, exchange information, capture measurements, and so on. The specific I/O components 550 that are included in a particular machine will depend on the type of machine. For example, portable machines such as mobile phones will likely include a touch input device or other such input mechanisms, while a headless server machine will likely not include such a touch input device. It will be appreciated that the I/O components 550 may include many other components that are not shown in
In further example embodiments, the I/O components 550 may include biometric components 556, motion components 558, environmental components 560, or position components 562, among a wide array of other components. For example, the biometric components 556 may include components to detect expressions (e.g., hand expressions, facial expressions, vocal expressions, body gestures, or eye tracking), measure biosignals (e.g., blood pressure, heart rate, body temperature, perspiration, or brain waves), measure exercise-related metrics (e.g., distance moved, speed of movement, or time spent exercising) identify a person (e.g., voice identification, retinal identification, facial identification, fingerprint identification, or electroencephalogram based identification), and the like. The motion components 558 may include acceleration sensor components (e.g., accelerometer), gravitation sensor components, rotation sensor components (e.g., gyroscope), and so forth. The environmental components 560 may include, for example, illumination sensor components (e.g., photometer), temperature sensor components (e.g., one or more thermometers that detect ambient temperature), humidity sensor components, pressure sensor components (e.g., barometer), acoustic sensor components (e.g., one or more microphones that detect background noise), proximity sensor components (e.g., infrared sensors that detect nearby objects), gas sensors (e.g., gas detection sensors to detect concentrations of hazardous gases for safety or to measure pollutants in the atmosphere), or other components that may provide indications, measurements, or signals corresponding to a surrounding physical environment. The position components 562 may include location sensor components (e.g., a Global Position System (GPS) receiver component), altitude sensor components (e.g., altimeters or barometers that detect air pressure from which altitude may be derived), orientation sensor components (e.g., magnetometers), and the like.
Communication may be implemented using a wide variety of technologies. The I/O components 550 may include communication components 564 operable to couple the machine 500 to a network 580 or devices 570 via a coupling 582 and a coupling 572, respectively. For example, the communication components 564 may include a network interface component or other suitable device to interface with the network 580. In further examples, the communication components 564 may include wired communication components, wireless communication components, cellular communication components, Near Field Communication (NFC) components, Bluetooth® components (e.g., Bluetooth® Low Energy), Wi-Fi® components, and other communication components to provide communication via other modalities. The devices 570 may be another machine or any of a wide variety of peripheral devices (e.g., a peripheral device coupled via a USB).
Moreover, the communication components 564 may detect identifiers or include components operable to detect identifiers. For example, the communication components 564 may include Radio Frequency Identification (RFID) tag reader components, NFC smart tag detection components, optical reader components, or acoustic detection components (e.g., microphones to identify tagged audio signals). In addition, a variety of information may be derived via the communication components 564, such as location via Internet Protocol (IP) geolocation, location via Wi-Fi® signal triangulation, location via detecting an NFC beacon signal that may indicate a particular location, and so forth.
In various example embodiments, one or more portions of the network 580 may be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless LAN (WLAN), a WAN, a wireless WAN (WWAN), a metropolitan area network (MAN), the Internet, a portion of the Internet, a portion of the Public Switched Telephone Network (PSTN), a plain old telephone service (POTS) network, a cellular telephone network, a wireless network, a Wi-Fi® network, another type of network, or a combination of two or more such networks. For example, the network 580 or a portion of the network 580 may include a wireless or cellular network and the coupling 582 may be a Code Division Multiple Access (CDMA) connection, a Global System for Mobile communications (GSM) connection, or another type of cellular or wireless coupling. In this example, the coupling 582 may implement any of a variety of types of data transfer technology, such as Single Carrier Radio Transmission Technology (1×RTT), Evolution-Data Optimized (EVDO) technology, General Packet Radio Service (GPRS) technology, Enhanced Data rates for GSM Evolution (EDGE) technology, third Generation Partnership Project (3GPP) including 4G, fourth generation wireless (4G) networks, Universal Mobile Telecommunications System (UMTS), High Speed Packet Access (HSPA), Worldwide Interoperability for Microwave Access (WiMAX), Long Term Evolution (LTE) standard, others defined by various standard-setting organizations, other long range protocols, or other data transfer technology.
The instructions 516 may be transmitted or received over the network 580 using a transmission medium via a network interface device (e.g., a network interface component included in the communication components 564) and utilizing any one of a number of well-known transfer protocols (e.g., HTTP). Similarly, the instructions 516 may be transmitted or received using a transmission medium via the coupling 572 (e.g., a peer-to-peer coupling) to the devices 570. The term “transmission medium” shall be taken to include any intangible medium that is capable of storing, encoding, or carrying the instructions 516 for execution by the machine 500, and includes digital or analog communications signals or other intangible media to facilitate communication of such software.