Optimize your manufacturing with AI.
Discover how LeanQubit's solutions can reduce downtime and improve quality on your production line.
Initializing Systems...
Discover how LeanQubit's solutions can reduce downtime and improve quality on your production line.
At LeanQubit, we worked with an early-stage pharmaceutical capsule manufacturer that relied heavily on manual visual inspection to identify defective capsules before downstream operations. Capsules move through the production line in a controlled, single-file flow, and operators visually inspect them for defects that can arise during head-and-body fitting as well as from incorrect or faulty imprinting.
The existing inspection process was labor-intensive and dependent on continuous human attention. The client reported an inspection accuracy of approximately 70%, meaning a meaningful share of defective units could pass through the manual inspection process.
We addressed this by deploying FactoVision as an on-premises edge computer-vision solution. Cameras capture individual capsule views as they pass the inspection point, and our AI workflow makes a first-stage good-versus-defective decision. Defective capsules then move through a second classification stage that identifies the defect category. The bad units are mechanically segregated, while accepted capsules continue forward.
The resulting system delivered a practical industrial inspection workflow with approximately 96–97% inspection accuracy and a live quality dashboard that shows defect categories, trends, and yield-rate information. The project demonstrates how LeanQubit can turn a repetitive visual task into a structured, measurable, and scalable quality process.
The use case sits within pharmaceutical capsule manufacturing, where product quality depends on consistent capsule formation, correct head-and-body fitting, and correct product identification or imprinting. In this environment, defects are not only a product-quality concern; recurring defect patterns can also signal machine, pressure, handling, or process conditions that should be investigated.
| Context | Case Study Detail |
|---|---|
| Industry | Pharmaceutical / capsule manufacturing |
| Product flow | Capsules travel in a controlled single-file flow on a rail / tray-style path |
| Inspection point | After capsule printing and before downstream acceptance / segregation |
| Primary quality goal | Separate acceptable capsules from defective capsules automatically |
| Secondary goal | Identify which defect category is occurring so recurring issues can be investigated |
| Deployment model | On-premises, edge-based processing |
The client had production equipment in place but had not yet reached the level of automated, technical visual inspection needed for reliable capsule quality monitoring. The inspection task was therefore performed manually, with operators watching capsules as they moved through the line and removing defective units when they were identified.
The challenge was not simply to detect a bad capsule. The client also needed to understand what kind of defect was occurring, how frequently it appeared, and whether recurring patterns pointed to a process or machine issue.
The case-study input provided by the project team reports approximately 70% accuracy for the previous manual visual inspection process. This figure is used as the documented baseline for the comparison in this draft.
Before our implementation, operators performed the inspection visually while capsules moved one-by-one along the production path. The work consisted of observing each capsule, determining whether it looked acceptable, and manually removing units that appeared defective.

The inspection problem was difficult because defects could originate from more than one mechanism and could have very different visual signatures. A simple binary detector would answer only part of the client’s need.

That distinction shaped the overall AI architecture. Instead of forcing one classifier to solve every decision at once, we designed a multi-stage inspection workflow that mirrors the operational decision tree used by the customer.
At LeanQubit, we implemented the solution using FactoVision, our AI-driven visual inspection platform. The solution combines camera-based inspection, edge inference, structured defect classification, automated segregation, and live quality analytics.
We intentionally describe the solution at the system and workflow level. Specific model names, model architectures, training framework names, camera vendors, and other sensitive implementation details are excluded from this public-facing source document.
Our engineering approach focused on making the inspection system useful on the production line rather than building a model in isolation. We considered the capsule flow, the visual inspection point, the required pass/fail decision, the defect taxonomy, and the downstream physical segregation step as one connected workflow.
1. Define the inspection target: We formalized the visual quality problem around the complete capsule: physical condition, fitting-related defects, and printed information.
2. Capture real production images: We worked with the visual conditions of the operating line so the AI workflow was designed around the actual appearance of capsules in motion rather than an idealized laboratory setup.
3. Build a two-stage decision flow: We separated acceptance classification from defect categorization so the system could first establish product status and then provide a more specific explanation for rejects.
4. Connect AI decisions to automation: A defective decision is not useful by itself. We therefore connected the inspection decision to mechanical segregation so the bad unit is removed from the accepted product stream.
5. Expose the information operationally: We integrated the results into a FactoVision dashboard so manufacturing teams can see defect trends and yield information in a usable form.

The AI development pipeline was structured around a production-grade inspection loop: capture, analyze, classify, act, and learn from the operational signal.
| Stage | What Happens | Output |
|---|---|---|
| Image capture | Camera observes each capsule as it passes the inspection zone. | Inspection frame |
| Stage 1 classification | AI evaluates whether the capsule is acceptable or defective. | GOOD / DEFECTIVE |
| Stage 2 classification | Only defective units are further categorized. | Defect category |
| Decision integration | The result is passed to the downstream handling logic. | Pass / reject decision |
| Mechanical segregation | Defective units are physically removed from the accepted flow. | Separated reject stream |
| Analytics | Inspection results are aggregated in FactoVision. | Defect trends / yield visibility |
We intentionally keep the algorithm description at a solution level rather than exposing proprietary model details. At runtime, the camera captures an image of the passing capsule and sends the visual information into the FactoVision edge-processing pipeline.
The first decision layer answers the most important production question: is this capsule acceptable? If the capsule passes, it continues through the process. If the capsule fails, the system invokes the second-stage defect classification logic to identify the defect family.
The classification taxonomy was designed to give the client more than a simple reject count. It gives them a structured way to understand what kind of defect is occurring and where recurring patterns may require investigation.

| Defect Category | Description / Manufacturing Context |
|---|---|
| Crack | Crack associated with capsule fitting or handling, including defects that can arise while the head and body are brought together. |
| Faulty Imprint / Misprint | Incorrect or defective printed information on the capsule. Printing occurs before the inspection stage. |
| Poke | Localized deformation or indentation that can occur around the capsule surface or edge during fitting. |
| Scratches | Visible surface scratching identified during visual inspection. |
| Squeeze | Capsule deformation that can result from excessive fitting pressure during head-and-body assembly. |
The value of the system comes from closing the loop between AI detection and physical handling. When a capsule is classified as defective, the result is used to route the unit into the reject path rather than allowing it to continue with accepted product.
The system changes inspection from a visual observation task into an operational control loop: detect → classify → segregate → analyze. That structure is central to the business value of the implementation.
We deployed the solution on premises with edge-based processing. This architecture keeps the image-analysis workflow close to the production equipment and avoids making the inspection decision dependent on a remote processing round trip.
| Layer | Role in the solution |
|---|---|
| Industrial cameras | Capture the passing capsule imagery at the inspection point. |
| Edge inference layer | Runs the FactoVision visual inspection workflow locally. |
| Decision / control interface | Passes the inspection outcome to the downstream handling logic. |
| Mechanical segregation | Removes defective capsules from the accepted product flow. |
| FactoVision dashboard | Presents defect categories, trends, and yield information. |
We also connected the inspection outcomes to a FactoVision dashboard so the client could see not only whether production was generating defects, but which defect categories were appearing and how the quality signal was moving over time.

The implementation created value at three levels: inspection reliability, operational efficiency, and process insight.
| Before | With FactoVision |
|---|---|
| Manual visual inspection | Automated camera-based inspection |
| Approx. 70% reported manual accuracy | Approx. 96–97% AI-assisted inspection accuracy |
| Operator-dependent pass/fail judgment | Consistent automated decision flow |
| Defects identified but not structurally classified | Defects grouped into named categories |
| Manual removal of defective units | Mechanical segregation triggered from the inspection result |
| Limited live analytics | FactoVision dashboard with defect trends and yield visibility |
| Reactive investigation | Structured defect data supports investigation of recurring issues |
| Layer | Technology / Approach |
|---|---|
| Vision capture | Industrial camera-based image acquisition |
| AI inspection | AI inspection |
| Decision logic | Two-stage good/bad plus defect-category workflow |
| Processing | On-premises edge computing |
| Automation | Mechanical reject / segregation integration |
| Analytics | FactoVision dashboard and live quality indicators |
FactoVision fits this use case because the platform is designed around AI-driven visual inspection and intelligent object recognition, with a focus on real-time industrial image analysis. In this project, we applied those capabilities to a quality-control problem where the customer needed an immediate decision, an interpretable defect category, and a downstream action.
The reported manual baseline of approximately 70% was improved to approximately 96–97% with the AI-assisted FactoVision inspection workflow.
Defective capsules are identified by the inspection workflow and routed to mechanical segregation, reducing dependence on manual removal.
The client receives structured defect-category information and live yield / quality visibility through the FactoVision dashboard.
The complete solution runs on premises with edge-based processing designed for the production environment.
At LeanQubit, we transformed a labor-intensive capsule inspection task into an automated quality-control workflow using FactoVision. The key change was not simply adding a camera; it was connecting visual inspection, multi-stage defect intelligence, physical segregation, and operational analytics into one coherent system.
By moving the inspection decision onto an on-premises edge architecture, the client gained a repeatable production-line inspection process with approximately 96–97% reported accuracy, structured defect classification, and live visibility into defect trends and yield. The case demonstrates how LeanQubit can apply industrial computer vision to pharmaceutical manufacturing environments where quality, traceability, and timely process feedback matter.
It inspects individual capsules as they move through the production line, checking overall visual condition and printed information after the printing stage.
No. The workflow first classifies the capsule as good or defective and then categorizes defective units by defect type.
The documented categories for this use case are crack, faulty imprint or misprint, poke, scratches, and squeeze.
The inspection result is connected to mechanical segregation so defective units are removed from the accepted product flow.
The solution is deployed on premises with edge-based processing close to the production line.
Yes. FactoVision provides dashboard-based visibility into defect categories, trends, and yield information.
The project team reported improvement from approximately 70% manual inspection accuracy to approximately 96–97% with the AI-assisted inspection workflow.
No. This public-facing case-study draft intentionally keeps model names and proprietary implementation specifics confidential.