In the context of agricultural modernization and intelligentization, automated fruit recognition is of significance for improving harvest efficiency and reducing labor costs. The variety of fruits commonly planted in orchards and the fluctuations in market prices require farmers to adjust the types of crops they plant flexibly. However, the differences in size, shape, and color among different types of fruits make fruit recognition quite challenging. If each type of fruit requires a separate visual model, it becomes time-consuming and labor intensive to train and deploy these models, as well as increasing system complexity and maintenance costs. Therefore, developing a general visual model capable of recognizing multiple types of fruits has great application potential. Existing multi-fruit recognition methods mainly include traditional image processing techniques and deep learning models. Traditional methods perform poorly in dealing with complex backgrounds and diverse fruit morphologies, while current deep learning models may struggle to effectively capture and recognize targets of different scales. To address these challenges, this paper proposes a general fruit recognition model based on the Multi-Scale Attention Network (MSA-Net) and a Hough Transform localization compensation mechanism. By generating multi-scale feature maps through a multi-scale attention mechanism, the model enhances feature learning for fruits of different sizes. In addition, the Hough Transform ellipse detection compensation mechanism uses the shape features of fruits and combines them with MSA-Net recognition results to correct the initial positioning of spherical fruits and improve positioning accuracy. Experimental results show that the MSA-Net model achieves a precision of 97.56, a recall of 92.21, and an mAP@0.5 of 94.81 on a comprehensive dataset containing blueberries, lychees, strawberries, and tomatoes, demonstrating the ability to accurately recognize multiple types of fruits. Moreover, the introduction of the Hough Transform mechanism reduces the average localization error by 8.8 pixels and 3.5 pixels for fruit images at different distances, effectively improving the accuracy of fruit localization.