Mushrooms are an important and refined industry in Taiwan's agriculture. In the current cultivation work, a large amount of labor is required from the preparation of the strain, the preparation and filling of the culture medium, the inoculation, the bacteria, the bacteria, the mushrooming, and the final packaging classification. The purpose of this study is to plan the system for the detection of bacteria in the mushroom industry facility. In the aspect of the bacteria detection system, the inspection of the degree of bacteria and the inspection of the bacteria are improved. At present, the operation test is carried out by visual inspection. It may be caused by the negligence of the operation, and the mushroom bag infected with the bacteria enters the mushroom room, which affects Mushrooms grow or infect other mushroom packs. In order to change the current production line equipment, this study uses a mechanical vision method to establish a prototype detection system. The light-storing room and image capture software are used to save images that are relatively clear and easy to implement image analysis for future application. On the complete inspection system.