Prof. Dr.-Ing. Bert Arnrich

Activity Recognition in the Context of Obsessive-Compulsive Disorder Detection

Master Thesis

Martin Schlegel, Supervisor: Kristina Kirsten


Mental disorders are nowadays one of the most common diseases. One prevalent representative is Obsessive-Compulsive Disorder (OCD). It consists of two aspects: a) recurrent certain thoughts, called obsessions, and b) recurrent certain routines, named compulsions. Affected people are unable to control neither of them. Often times the compulsions are performed to overcome and reassure the anxiety caused by the obsessions [1]. Even though it is widely known that the common kinds of treatments are way more effective the sooner the disease is diagnosed and therefore the treatment is started [3], the illness is in the majority of cases diagnosed very late [2].

The majority of people using smartwatches and smartphones in their daily lives. Former research has shown that it is possible to track and classify activities in the contexts of sports (e.g. walking, climbing stairs) or eating (e.g. drinking from a cup, eating pasta) by using their sensors [11]. It should be possible to reuse this approaches to detect OCD related activities, like washing hands or checking home appliances. Building on that the detection of compulsions (recurrent certain activities) should be feasible as well.


In order to face the problem of a late diagnosis, this thesis will examine to what extent an activity recognition system, based on input data provided by smartphone and smartwatch sensors, is capable of detecting OCD related activities (compulsions). The decision to focus on already present sensors is to facilitate an unobtrusive collection of data. Common sensors available in modern smart devices are for example the acceleration sensor, the gyroscope, the barometer, Global Positioning System (GPS), the compass, the mi- crophone and the pedometer. A major challenge hereby will be the fusion of data coming from various sensors in diverse devices with different timestamps and variable sampling rates.


[1] A. T. Carr. “Compulsive neurosis: a review of the literature”. In: Psychological bulletin (pp. 311). 1974.

[2] The National Institute of Mental Health (NIMH). Obsessive-Compulsive Disorder [Online]. Accessed: 31.03.2020, 18.20. url: www.nimh.nih.gov/health/ topics/obsessive-compulsive-disorder-ocd/index.shtml/.

[3] E. Burchi, E. Hollander, and S. Pallanti. “From treatment response to recovery: A realistic goal in ocd”. In: International Journal of Neuropsychopharmacology (pp. 1007–1013). 2018.