Depression is a mental illness characterized by three main symptoms: low mood, delayed thinking, and motor inhibition. Depression is mainly manifested as low mood, decreased interest, pessimism, delayed thinking, lack of initiative, self-blame and guilt, poor diet and sleep, fear of suffering from various diseases, feeling unwell in multiple parts of the body, seriously disturbing the patient's life and work, and bringing a heavy burden to the family and society. According to survey data from the World Health Organization, the prevalence of depression has skyrocketed 10 to 20 times globally in the past 30 years, becoming one of the four major diseases in the world. Depression can be divided into endogenous depression, reactive depression, drug-induced depression, postpartum depression, menopausal depression, and geriatric depression. This study analyzed various data on depression in the Kaggle dataset and selected life data from 1429 patients. Through the analysis of these data and image comparison, this paper can summarize the life factors that affect the incidence rate of depression, which can better help people prevent the occurrence of depression.