The apparel industry is increasingly adopting automation technologies and investing in research to address global reshoring efforts and rising labor costs. One essential process for automation in garment factories is top stitch, which involves sewing two fabric sheets together along a seam line while maintaining a consistent distance from it. This paper presents an automated top stitch system that retrofits a legacy machine using a vision-based macro-mini approach. The system mainly comprises a two-degree-of-freedom automatic sewing machine as the legacy machine, a vision sensor module, a mini-actuator module, and an infrared sensor module. The vision sensor module detects the seam line on the fabric, even in the presence of positional uncertainties, such as, human errors. The infrared sensor module monitors the sewing sequence, while the mini-actuator module operates simultaneously with the sewing machine to compensate for any misalignment. The system demonstrates improvements, with the average and the maximum errors reduced by 79% and 67%, respectively, and the standard deviation improved by 73%, compared to those from the operation without our system. To the best of our knowledge, this is the first development of an autonomous top stitch system using a retrofitted legacy machine, presenting a novel architecture that integrates sensors and actuators through a macro-mini approach.