TheoryLane Case Studies

A.I. and Activity Based Costing

The Problem

A mid sized food-manufacturing firm had launched a new modernization / digital-transformation initiative. Part of the transformation initiative was a move to Activity Based Costing (ABC) for their Financial Planning and Analysis (FP&A).

In ABC, drivers are identified as the activities (tasks) that are related to specific products and associated with a cost. Cost drivers are critical in ABC since they determine the costs assigned to products and services. For example, if all raw material purchases are made in bulk at harvest time, then the total number of pounds purchased each year is a good cost driver.

In the case of this company, their primary cost drivers were the number of eggs and weight/volume of liquid eggs processed. Unfortunately, their current system was not capable of generating accurate counts and weights we only available through small sample.

The Solution

The CTO reached out to TheoryLane with a simple question: “How accurately can we count the number of eggs in a video or picture?” Our answer was “very.”

The computer vision / A.I. routines used in counting, sizing, and estimate weight of eggs in an image are very similar to what microbiologists use to count cells in a microscope slide or petri dish. The algorithms are also similar to those used in facial recognition and sizing.

Using computer vision, the solution is quite simple: 1) count the number of eggs in a image, 2) estimate their size and 3) calculate their total weight. Of course, collecting data to train the model was not so simple; and even more difficult was creating a production level data-pipeline so the counts could be generated with high-availability.

Data collection required annotating images on custom made scales so we could validate the count, size, and weight of eggs on each image. Each image had to be prepared for counting or accurate size estimation, even though the model was intended to be used for cases where no scale was available.

The data pipeline was far more complex. Because of its remote location, the client did not have reliable internet; therefore, an on-premise solution had to be engineered. As the images were produced at a much faster rate than the model could process, we also deployed a container swam reading and writing from redis queues.

The queues would hold the image file location until a model container could process the image, then the image counts and weights were written to another queue until a separate set of containers could write the data to a database.

Finally, another set of containers was deployed as an internal web portal to serve as a control and monitoring panel.

As mentioned in the related digital transformation case study, this initiative was so successful it made the cover of Strategic Finance Magazine and the CTO has an interview about it on

Digital Transformation in Manufacturing

The Problem

Following a near-catastrophic business disruption, a medium-sized food-manufacturing firm required better operations and cost monitoring to ensure continuity of business.  To implement the new monitoring, their current sensor, application, and data stack required significant upgrades.

Unfortunately, the manufacturing business culture and digital transformation culture did not align, creating difficulties in rolling-out new technical solutions as well as retaining qualified employees.

The Solution

Digital Transformation was one half of a larger initiative featured on the February 2022 cover of Strategic Finance magazine:

The roadblocks to digital transformation were removed largely by getting leadership to recognize a problem existed. The problem was a vicious cycle of “Crunch Culture” and “Technical Debt”. 


Technical Debt: Due to the rapid growth of the company, its software technology stack was not as performant as desired or lacking some key functionality needed for future growth.  This was due to a lack of change management in the software development process.

The company began to implement new operational processes, employee training, and technology that would mitigate Crunch Culture and Technical Debt. Again, very simple processes to follow now that the problem was identified.

Their digital transformation was so successful, they would go on to develop not only an AI egg counting processes, but also an AI egg sizing and weighting application. – which would eventually reward them with the cover story linked above.

Cloud Vision AI and Dynamic Digital Campaign Performance Analytics

The Problem

A Durable Goods Manufacturing Client’s In-house dynamic digital marketing created large amount of data. The difficultly in managing the data volume limited their ability to effectively use media and consumer behavior to better understand buyer personas.

In a traditional digital marketing campaign, only a few asset variations are used. (An “Asset” being the combination of verbiage, imagery, coloring, products, and other attributes of a digital display advertisement.) Alternatively, a Dynamic Digital Marketing Campaign involves multiple variations of verbiage, imagery, colors, products, etc. The combinations quickly become difficult to manage; for example, five text variations, with five different images, in five colors create 5*5*5 or 125 unique creative assets.

In the case of this client, they had over 2,000 unique assets for a single campaign; therefore, the more traditional data management techniques of manually assigning attributes to each asset was too work intensive. (“Attributes” such as product, size, general color schema, mood, number of people, text, etc.)

The Solution

An automated image tagging routine was developed in Google Cloud Platform consisting of uploading thousands of assets to a GCP Cloud Storage Bucket, using GCP Cloud Vision API to assign the image attributes, then loading the Cloud Vision API output into a BigQuery table.

The performance of each asset variation was also loaded into a BigQuery table.

The performance and cloud vision output were matched, and reporting tables constructed.

Analytics tools such as Looker and PowerBI were connected to the matched reporting tables.

The Outcome

Google Cloud Vision API benefited the client on several levels. Primarily, they were able to understand which imagery and language resulted in better performance.

Additionally, the assets were assigned attributes in seconds and in a consistent manner. If the attribute assignment had been performed manually, we may expect a week of effort and with inconsistent attributes due to human error.

Third Party Audit Management App

The problem

“I want to grow my business, but all I ever seem to do is clean up these reports!”

It’s a common problem for any business, but in this case of this client, their business is managing highly skilled auditors who provide 3rd party non-financial statement assurance services – often required by banks and insurance agencies.

Each auditor wants to submit their audit report in a different format – leading to significant report formatting effort for the client.

The solution

When a process needs to be formalized, automation and governance is usually the first place to turn. This problem was no different.

TheoryLane developed a high-level information flow diagram to help align technical terminology with business processes.

During TheoryLane facilitated Round table discussions on how digital information moved between the agents in an audit, an opportunity was identified.

The application would then produce a pre-formatted report based on the audit information to develop an application which auditors could use to input audit notes, assessment values, and relevant evidence.

Additionally, financial models were constructed. A cost-benefit analysis was created to determine value of expanding application versus additional human resources. A value-proposition and valuation model revealed potential external market viability.

The Outcome

TheoryLane produced a delivery plan for Proof of Concept application and provided development resources to successfully delivery the proof-of-concept application.

Proof of Concept was sufficient to create standardization in smaller audits, freeing up client time to pursue additional business, and even rolling Proof-of-Concept app into potential start-up.

Compliance NLP Innovation Roadmap

The problem

“We’ve automated a manual process; can we do something with all this data moving around?”

When a business moves its data environment from spreadsheet and emails to web apps and cloud storage, a remarkable thing happens – the data is now accessible by more than one person!

In this case study, the process of insurance contract,  claim, and coverage reconciliation was moved to an online application. In the application, file upload and document reconciliation were still performed manually.

The solution


*Specific use cases not shown due to proprietary nature

In uncertainty there is opportunity, TheoryLane performed innovation roadmapping and associated research recommendations on enhancements to the client’s data environment and data processing.

The outcome

Using our established method of communicating complex business processes in simple language, TheoryLane identified several opportunities to apply advanced ML / AI solutions without disruption of existing processes.

Following the steps outlined in their roadmap, using the recommended technology, they were able to implement business specific applications of NLP functions such as term similarity and ID similarity matching within their next development iteration.

To provide a more informed perspective for financial decision making, TheoryLane developed make-vs-buy and cost benefit analysis on Cloud PaaS and SaaS offerings to determine which analytics services to purchase ‘off the shelf’ and what functionality should be developed ‘in-house’ to protect their competitive advantage. (i.e. differentiate the firm from all the other competitor using the same SaaS product.)

Combination of Cloud PaaS components with proprietary operations was determined to be the best balance between strategic capability and 3rd party managed affordability.

For example, the diagram below is a simplified example of how Data Scientists may perform data transformations and model development within a managed environment, while still retaining the flexibility (and ownership) of code developed within said environment.

Architecture diagram showing data movement from audit applications to bigquery database