Recognition of Upside-Down Cans with Conveyor Line Stop

Summary

ClientA major producer of aluminum cans and lids for soft drinks and alcoholic beverages.

TaskImplement a system that detects upside-down cans using video cameras and automatically stops the production line to prevent equipment damage.

ResultThe system enabled accurate detection of upside-down cans and immediate conveyor stop, preventing breakdowns of beverage filling equipment.

Situation

The customer manufactures aluminum cans and stacks them on pallets in 16 layers. Each layer contains several hundred cans, all of which must be oriented the same way: bottom down, open side up.

However, due to specific features of the production process, upside-down cans occasionally appear on can manufacturing lines. During conveyor transport, cans can flip because of vibration or high conveyor speed. Such disruptions are typical for lines where cans of different volumes (e.g., 330 ml and 450 ml) are produced or when cans are arranged chaotically.

The issue is that upside-down cans cause damage to fillers — devices used for filling cans at the customer’s bottling line. Each filler costs USD 1.5, and its replacement requires a 30-minute line stop. With a line speed of 60,000 cans per hour, such downtime results in significant financial losses. In addition, the bottling plants where filler breakdowns occur are entitled to file claims, which can lead to reputational risks for the can manufacturer.

The customer decided to leverage a video counter’s capabilities to detect upside-down cans and automatically stop the line, thereby preventing filler breakdowns at their clients’ facilities.

The challenge

The customer’s management set the objective of implementing a system that, in automatic mode with the help of a video camera:

  1. Detects upside-down cans on the conveyor in any position (center, edges, groups, single cans);
  2. Stops the conveyor, preventing potential equipment breakdowns at client facilities.

To achieve this, the video counter must not only recognize cans but also integrate with conveyor equipment. This helps minimize financial losses from equipment damage at client plants.

Solution

We started developing a system that accurately detects upside-down cans, integrates with line automation, and simplifies operators’ work.

Equipment setup

To control the conveyor, we used a digital output module — a device that transmits commands from the program to the automation system. We selected a 24 V transistor-switch model because it withstands frequent switching without wear. An alternative option with electromagnetic relays was rejected: relays last for about 100,000 load switchings, which with frequent use could lead to breakdown within a month.

The equipment operates as follows:

  1. The computer processes the video stream and controls the module, ensuring smooth system operation.
  2. The module is connected via the standard Modbus TCP protocol, ensuring fast and stable command transmission.
  3. Cameras recording the line are connected to the computer over a local network, minimizing data transmission delays. Camera positions were adjusted multiple times to achieve clearer can images and increase recognition accuracy.

Dataset collection for analysis

To ensure accurate recognition of upside-down cans, we collected an extensive dataset of video recordings. On each line, we recorded 10–15 minutes of video, covering a wide range of scenarios: single cans, groups in the center, left, right, at the edges, in staggered or random patterns. Videos were recorded with cans in different colors (red, green, white, about 20 basic shades), applying a black-and-white filter to standardize processing regardless of design.

The dataset contained thousands of frames, including single cans without neighbors, surrounded by upright or upside-down cans. The recognition zone was configured manually, with cameras rigidly fixed so that changes in angle would not disrupt the system. If a camera was shifted, the zone was promptly redefined to maintain accuracy.

Video counter training

The video counter was trained on the collected recordings so that the neural network could reliably detect upside-down cans under any conditions. The initial model occasionally missed cans, for example, at conveyor edges. To correct this, we performed additional training, adding new frames with problematic scenarios. Both 330 ml and 450 ml cans were included so the system could handle different sizes. When camera angles changed (e.g., after reinstallation), the model was adapted by recording new videos reflecting the updated view. This approach ensured reliability even in rare and nonstandard situations, which is critical for production environments with constantly changing line conditions.

Testing was carried out on all lines, including scenarios with single cans, groups, and various colors. This allowed us to achieve high accuracy: the system detected cans in challenging conditions such as dense flow or irregular positioning.

“Heartbeat” control setup

To verify stable system operation, we implemented a “heartbeat” — a signal confirming the program is running without errors. Initially, the heartbeat was configured to blink every 10 seconds so operators could see activity. Later, we switched from frequent blinking to a steady light. This simplified monitoring: operators could see that the system was active, and in case of a failure, the light went off, signaling a problem.

The system sends a signal to the digital output module to stop the conveyor when the neural network detects upside-down cans. The signal is activated for 0.5–1 second and deactivates if no cans are detected.

Testing confirmed reliability: conveyor stop signals and heartbeat worked correctly, and the indicator lamp clearly displayed system status.

Results

The upside-down can recognition system eliminated the risk of potential breakdowns and downtime at the customer’s clients’ bottling lines, ensuring reliable quality control across all production lines. Upside-down cans are now detected instantly in automatic mode. A user-friendly interface with three screens displays line status data in real time, simplifying operators’ work.

The issue of claims was completely resolved. Downtime at bottling facilities was reduced to a minimum, and the customer’s reputation remains impeccable.

The successful launch enabled the customer to plan system rollout across all plants, confirming its scalability.

Timeline. The project took one and a half months (March–April 2025), including equipment setup, neural network training, and testing on all production lines.

Team. From CamContador, two specialists worked on the project — a developer and an engineer. From the customer’s side — three employees: head of quality control, automation engineer, and equipment installation specialist.

Read More