With the impact of African swine fever, the survival rate of domestic pigs has sharply decreased, and pork prices continue to rise. Many unscrupulous elements obtain illegal profits by avoiding inspection and quarantine, processing sick and dead pigs, and injecting water, etc. Unquarantined meat products pose serious food safety risks. In this context, we propose a machine learning based risk identification method for illegal slaughter of live pigs. Firstly, we use the RetinaNet algorithm to detect live pig transport vehicles and use a dual residual network to Super-Resolution the vehicle area in the detected image to improve facial clarity. Subsequently, the ArcFace algorithm is used to match the facial information with the ex-convicts, and finally, the Location of vehicles passing through, time, frequency and facial analysis results are combined for calculation and scoring and provide the risk warning for illegal slaughter of live pigs.