In general cases, we mostly follow the above diagram for deployment. There are 4 layers to consider:
Storage refers to the database which is updated by images regularly and its database schema. It’s loaded in memory/NoSQL to calculate real-time aggregates.
The model stage includes the selection of analytical techniques, testing different models, and reviewing the result. Training a model is required so that it can understand the various patterns, rules, and features followed by testing the model which determines the percentage accuracy of the model as per the requirement of the project or problem. Creating a machine learning model cannot be viewed as a goal in and of itself. The model should bring value to the firm, generate new profits, or reduce costs and other parts of the application need to interact with to start with the basics.
Business logic is the portion of an enterprise system that determines how data is transformed or calculated, and how it is routed to people or software (workflow).
Lastly, we need to design the API to interact with the model. It is important to define how often we want to run inferences on our model. Are online (i.e., real-time) predictions important to us or can we batch-process millions of images overnight? This will impact the API design immensely.