Since the global eruption of COVID-19, there have been issues with the global medical management system. The classification and treatment of medical waste has brought a huge burden to medical staff. Traditional manual classification has problems such as the heavy workload, difficult identification, and susceptibility to infection. This paper designs an intelligent medical waste detection and classification system based on machine vision. Based on deep learning models such as YOLOv5 and YOLO-resnet18, the data is trained and optimized to obtain a target detection model suitable for medical waste. Through experimental tests, the system has fast detection speed and high accuracy, and the accuracy of medical waste detection and classification reaches 90% and 99% respectively.