Today, with the arrival of an aging society, the average age of the population is rising. It is known that the physiology of a person degrades with age. There are approximately 285 million visually impaired people in the world, of whom 140 million are elderly people over the age of 50, and 110 million of these visually impaired elderly people suffer from multiple chronic diseases. In the case of multiple medication usage, these 110 million vulnerable people will be more likely to take the wrong medicines or forget to take their medication. To solve this problem, this paper proposes a wearable smart-glassesbased drug pill recognition system using deep learning, named MedGlasses, for visually impaired people to improve their medication-use safety. The proposed MedGlasses system consists of a pair of wearable smart glasses, an artificial intelligence (AI)-based intelligent drug pill recognition box, a mobile device app, and a cloud-based information management platform. Experimental results show that a recognition accuracy of up to 95.1% can be achieved. Therefore, the proposed MedGlasses system can effectively mitigate the problem of drug interactions caused by taking incorrect drugs, thereby reducing the cost of medical treatment and providing visually impaired chronic patients with a safe medication environment. INDEX TERMS Artificial intelligence over the Internet of Things (AIoT), deep learning, drug pill recognition, image sensor, image processing, medication-use safety, visually impaired, wearable devices.