1 Introduction

Early detection of mental disorders prevents their progression. Automating psychological tests can help prevent mental disorders. We deployed three phases to automate psychological drawing tests. These three phases are defined as follows:

Phase1, collecting a comprehensive dataset called OBGET that includes 817 samples of children and adults, male and female participants with healthy or mental disorders, labeling samples for mental disorders by a psychologist and labeling sketched patterns of each test semi-automatically using the proposed semi-automatic labeling of patterns, presenting descriptive and inferential statistical analysis.

Phase 2 classified nine patterns of each test using the proposed modified YOLO V5 called MYOLO V5.

Phase 3 scores drawing patterns according to psychological criteria using associated rules automatically.

The proposed modified YOLO V5 classified patterns of each OBGET dataset sample into nine classes. The proposed modified YOLO V5 includes the proposed architecture, activation function, optimization function, loss function, and final model, including weights, biases, parameters, and gradients.

The Original Bender Gestalt drawing test is a low-cost and non-invasive technique widely used in neural systems and rehabilitation engineering [1]. The Original Bender Gestalt drawing test detects adult brain lesions [2]. To detect a wide range of mental disorders, a low-cost and quick solution is to use the automatic scoring of the Original Bender Gestalt drawing test [1]. Most of the research [3,4,5] uses EEG. People may have a phobia of EEG. Therefore, they would like to use other solutions such as psychological drawing tests, or they want to use online systems with the least spending time and money with the help of psychological tests. In this work, with the help of the original Bander Gestalt drawing test at the lowest cost using paper and pencil, data collection, labeling, classification, and automatic scoring of the original Bander Gestalt drawing test are done to check participants’ mental health.

The number of people suffering from mental disorders has increased these days. Due to the increasing need for psychologists, the desire for online services, and the lack of psychologists, the need for interactive visual systems is much greater than before [6]. Psychological computer-aided programs help people detect mental disorders faster and better. For mental disorders like physical diseases, prevention is more important than treatment. Therefore, developing applications to automate psychological tests can be a significant step in mental disorders early detection.

Using computer-aided programs to automate psychological tests makes it possible to detect mental disorders [7,8,9,10,11,12]. Computer-aided programs [13] and mental health detection systems are presented [14,15,16,17]. OBGESS is a psychologist-assistant system. For presenting OBGESS, a comprehensive dataset, pattern classification, and automatic scoring to detect patterns is needed. The Original Bender Gestalt test is one of the most powerful tests for detecting brain lesions [18], psychotic [19] such as anxiety, depression, hysteria, obsessive behaviors, psychopathy, alcoholism, psychosomatic disorders, and neurotic [20] such as schizophrenia in adults [1]. The original Bender Gestalt test includes nine patterns presented one at a time to participants and asked to draw patterns using a pencil and paper [21].

Mental disorders interfere with human behavior and daily activities. The original Bender Gestalt test detects psychosomatic disorders. Psychosomatic disorders limit human behavior and physical performance. Early detection of mental disorders prevents their progression. The Original Bender Gestalt drawing test is a low-cost, non-invasive, and nonverbal technique widely used to detect abnormal human behavior.

The Original Bender Gestalt drawing test detects brain lesions in adults. Brain lesions affect human behavior and physical movements. Using the Original Bender Gestalt drawing test to detect various mental disorders is a low-cost and quick solution. Due to the lack of the Original Bender Gestalt drawing test dataset, OBGET is fed as a comprehensive dataset to OBGESS.

Due to the lack of a computer-aided program for automatic scoring with high accuracy of the Original Bander Gestalt test in previous works [22,23,24,25,26,27,28,29,30], OBGESS is presented with high accuracy for children and adults in this work. For this purpose, to provide an OBGESS system for automatic scoring and mental disorder detection, some steps are required: dataset collection of the Original Bender Gestalt test for children and adults along with metadata, statistical analysis, mental disorder labeling, pattern labeling, and pattern classification with high accuracy.

Despite the high importance of data, some previous works [29, 30] do not mention data collection, statistical analysis, data labeling, mental disorder detection, and just present pattern classification of the Original Bender Gestalt test. Previous research in this field [29, 30] did not use a standard dataset, so their evaluation result is unreliable. Unfortunately, a comprehensive dataset has not been presented in this field. The OBGET dataset includes 817 tests. A psychologist detects mental disorders from tests, and statistical analysis is conducted. Necessary pre-processing is done, and dataset samples have been labeled by deploying the proposed semi-automatically labeling.

Contributions to the OBGESS proposed method include:

  • A comprehensive Original Bender Gestalt test dataset called OBGET is presented.

  • OBGET dataset statistical analysis is presented.

  • OBGET samples are tagged as different types of mental disorders by a psychologist.

  • The proposed semi-automatically labeling is deployed for labeling nine patterns in each OBGET sample.

  • Patterns are classified based on the proposed modified YOLO V5 called MYOLO V5.

  • Automatic scoring to classify patterns is based on associated rules according to the standard scoring of the Original Bender Gestalt Test.

This work is organized as follows: Sect. 2 describes related scoring systems. The proposed solution is described in Sect. 3. Section 4 explains the evaluation. Section 5 discusses the results. Finally, Sect. 6 presents an overview of the results and future works.

2 Related Works

Handwriting and hand sketches can detect abnormal human behavior and mental disorders [31, 32]. Detection of human emotional states [33,34,35,36,37] is presented using the DEAP datasetFootnote 1 [38]. EEG signals and faces of 32 participants were recorded. Participants may be reluctant to undergo EEG testing. This work detects mental disorders without special and stressful tools but only with a simple hand sketch. For social interaction scoring and analysis, authors [11] used the MatchNMingle datasetFootnote 2 [2] using wearable devices and cameras to collect 92 participants. Behavioral analysis can score and detect autism at an early age of 12 months, which requires interpretation by clinicians and is high cost and time-consuming. Using these devices may harm patients.

Computer-aided applications in the human behavior field [39,40,41,42,43,44,45,46,47] and psychology field [48,49,50,51,52,53,54], such as extracting emotions [55] from music and sound [56,57,58,59,60,61,62,63], detecting emotional data in colors [64, 65], and detecting human behavior [66]. Authors [67] provided a mobile-based application that extracts and scores a child's behavioral responses to a video played on mobile and records the reaction using a mobile camera.

Recent studies are divided into two general categories: (a) Scoring systems for freehand sketches and (b) Scoring systems for pattern drawings.

2.1 Scoring Systems for Free Hand-Sketches

This section includes scoring systems for freehand sketches [68] and related datasets [69].

Authors [70] present a scoring system for participants' drawings on a web-based dataset called KDF. A new object-based image retrieval method is presented to bring similar images together. Euclidean equivalence of shapes is meant to be the same. Authors [71] score and detect mental disorders by measuring participants' painting location on the page on the KDF dataset [70]. In another research [72], authors present a mental scoring system based on painting colors on the KDF dataset [70]. A dataset includes 70 children's paintings suffering from ADHD [73]. Children are asked to paint freely within 5 min. Authors use unsupervised learning to extract features. In [44], 111 participants' characteristics are analyzed. A text with 1,600 words and 13 paragraphs about water is provided for students. Participants pass three steps: read the paragraph, create their mental image, and draw their picture.

For detecting similar mental disorders, 11,550 sketches [74] were used. The lowest Hamming distance of each pair of rows of the sparse matrix means that participants' drawings interpretation is similar. A Clock Drawing Test is used to detect Alzheimer's disease [75,76,77,78,79] using a dataset containing 10,992 manuscripts from 44 authors aged 25 to 87 years. Smoothing Gaussian is also used to eliminate noise. A fuzzy k-nearest neighbor was used to extract dynamic features, and a convolutional neural network was used to extract static features. For scoring to visual memory [80], deep learning [81, 82] is used on a dataset containing 69,495 drawings. A support vector machine classifies 160 Gy-level facial sketches [69]. K-means is used to classify hand-drawing shapes [83], also mathematical calculations are used to identify the probability and estimation of rotations and changes. Support vector machine classifies 1000 handwritten documents [84], including texts, drawings, charts, tables, lists, and logos. Authors [85] designed six pencil and paper psychological drawing tests to score and detect mental disorders and used rule-based methods to predict mental disorders.

2.2 Scoring Systems for Pattern Drawings

This section investigates scoring systems for pattern drawings [69].

Authors [32] tried to detect depression, anxiety, and Parkinson's disease [86] on the EMOTHOW dataset. Each participant performs seven tests, including drawing geometric shapes and writing Italian sentences. The Random Forest algorithm analyzes these features. VGG-16 is used to classify dataset images [87] to score and detect mental disorders on a dataset that includes 120 participants ranging from 16 to 66 years. A convolutional neural network is used for scoring mental disorders on a dataset including 152 offline paintings [88]. For detecting mental disorders [89], participants fill shapes with colors. Images are classified using linear regression based on the number and type of used colors. Machine learning classifies and scores CDTFootnote 3 [69] on a dataset containing 3541 tests. Convolutional neural networks classify objects [91] on a CDT dataset [90] containing 65 samples. KNN and neural networks detect handwritten numbers for CDT [92] using the MNIST datasetFootnote 4 with 5000 samples. CDT scoring system records strokes, coordinates (x, y), and time online [93]. After completing the drawing and pressing the "Complete" button, test results will be displayed immediately using machine learning and geometric analysis. A support vector machine is used for classification and scoring a psychological test to detect dementia [94] on a dataset (Clock Drawing Test URL: www.clockdrawingtest.com).

An application [95] is presented to take a psychological test for detecting mental disorders. The CBFA algorithm is used for segmentation. Six machine learning methods classify and evaluate 456 CDT results [96]. Machine learning classifies [69] 65 CDT samples. CDT mobile application [97] detects mental disorders. K-nearest neighbor is used for classification. Biometric features are identified [98] from a dataset with 11,000 hand sketches. CNN extracts features, and SVM classifies gender and biometric identification. ANN (Approximate Nearest Neighbor) is used for sketch retrieval using two re-ranking schemes: relevance feedback and query retouching on the Manga dataset [99]. Manga contains 109 comic books with 21,142 pages. The Manga dataset scores and examines participant feelings after reading sentences. Sketch recognition has many methods [100]. Analyzing human visual data and emotion detection [101, 102] is challenging and a key issue. Identifying visual concepts about humans can affect decision-making models and is a challenging task that cannot be easily solved with automated approaches. OBGET dataset statistical analysis is reported. This section deals with descriptive statistics, and Sect. 5–1 presents inferential statistics. Descriptive statistics [103] include gathering, summarizing, organizing, classifying data, and reporting facts in diagrams. Diagrams describe the mean population and median range of variation and standard deviation [103].

This work presents a scoring system called OBGESS to detect mental disorders using pencil and paper Original Bender Gestalt Test without stressful, expensive devices. For training and testing phases, OBGESS is deployed on OBGET as a comprehensive dataset, which will be explained in the continue.

3 The Proposed Solution

3.1 Dataset

This section presents the OBGET dataset collection process, dataset statistics, and pattern classification. OBGET dataset doi is: XXX. OBGET dataset participants include students at schools and universities, university employees, and people with mental disorders. Data collection is offline, using a pencil and paper to draw patterns. OBGET dataset samples include metadata such as participants’ age, sex, education, income, being single or married, duration of drawing, and location of patterns on the page. The original Bender Gestalt test covers the age from 4 to 60 years [1] with five subgroups: children ranging from 4 to 11 years, adolescents ranging from 12 to 18 years, young participants from 19 to 35, middle-aged participants from 36 to 50 and old participants from 51 to 60 years.

Participants are asked to sketch a Fig. 1 graphical pattern on an A4 white paper. At the end of the test, information about participants, including age, gender, time duration, and educational degree, is stored in a text file. This is because these metadata may affect the test result and may be needed for different classifications for future works. Then, a laser scanner scans images, and metadata is stored within each test.

Fig. 1
figure 1

Original Bender Gestalt test cards [1]

Table 1 shows the number of adult participants who suffer from brain lesions is 9 (1.77%), psychotic participants are 3 (0.6%), neurotic participants are 177 (35.13%), and healthy participants are 315 (62.5%). Figure 2a shows the chart.

Table 1 Age, gender, education, financial situation, marital status, and original bender gestalt test results of adult participants
Fig. 2
figure 2

Descriptive statistics of disorder participants

According to Table 1, number of children participants who suffer from anxiety and depression is 88 (28.1%), ADHD 7 (2.2%), learning disorder 11 (3.5%) and healthy participants is 207 (66.1%). The diagram is shown in Fig. 2b.

3.2 The Proposed Semi-automatic Labeling and Data Pre-processing

This section first deals with data pre-processing and then explains labeling [104, 105] data. One of the significant challenges in image auto-labeling is selecting the right features. Feature selection has a meaningful impact on system performance. Usually, a combination of different features is used [106].

Scanned test images are saved in JPG format. Text files are also stored for each test containing participants' test data. Test images are converted into grayscale and size converted to 800 to 600 pixels resolution. In the Original Bender Gestalt test, placing patterns on the page is important and meaningful for psychologists. For detecting the place of patterns on each test, the page is divided into nine sections:

Top left, top middle, top right, bottom left, bottom middle, bottom right, middle left, middle right, and middle as shown in Fig. 3.

Fig. 3
figure 3

Split the page into nine zones

In each section, the number of non-white pixels is checked. The drawing is located in a section of the screen where the number of non-white pixels in that section is more significant than any other section. Overlaps of up to three sections may be selected at a time.

Figure 4 shows a raw OBGET dataset sample. A psychologist then reviews participants’ tests to detect mental disorders. OBGET dataset samples are labeled by mental disorder classes by a psychologist: 1-Depression, 2-Anxiety, 3- Stress, 4- Sexual problems, 5-Brain lesion, 6-Neuroticism, 7-Alcoholism, 8-Hysteria, 9-Obsessive, 10-Mental health, 11-Children Depression, 12-Children Anxiety, 13-ADHD, 14-Learning Disorders and 15-Normal Children. Next, each test's nine graphical patterns should be labeled from 1 to 9, corresponding to that pattern. Data is labeled using the proposed semi-automatic labeling method. Draw a rectangle around each pattern to label raw data and assign a class from 1 to 9. The coordinates of the surrounding box pixels are determined and stored in a file. Information includes test name, JPG file, rectangle coordinates (in pixels), and pattern number. Classes consist of nine categories from 1 to 9, shown in Fig. 1.

Fig. 4
figure 4

A sample of raw data from the dataset

Each category consists of raw data, participant information in text format, and pattern information for each test in CSV format. The metadata of Fig. 4 is presented in Table 2.

Table 2 Metadata structure of OBGET dataset samples

Table 2 specifies patterns, test names, and coordinates of the surrounding boxes for each pattern and category. For example, the first row of the second column in Table 2, “6. JPG, 81, 26, 154, 78, 1,” means that for a test named 6.jpg in the OBGET dataset, 26, 81, and 78 154 are pixels of two coordinates of a surrounding box that belongs to category number 1. Metadata with the same structure is stored for each 817 raw data in the OBGET dataset.

The proposed Semi-automatic labeling algorithm works as follows:

For each sample of the OBGET dataset, the following steps are done for all nine patterns.

  1. a)

    CSV file is opened

  2. b)

    User draws a surrounding box around each pattern manually

  3. c)

    and then the coordinates of surrounding are registered into a CSV file named as same as sample name automatically

  4. d)

    User inserts class number (1 to 9) manually and it is registered in front of related coordinates in the CSV file automatically

  5. e)

    to announce end of labeling for each sample user can press zero key

CSV file is saved and closed.

According to description above, a sample of using the proposed semi-automatic labeling program for patterns is shown in Fig. 5.

Fig. 5
figure 5

Semi-automatic labeling of patterns using a program

Each category consists of raw data, participant’s information in text format and patterns information for each sample in CSV format. Metadata of Fig. 5 is presented in Table 2.

As shown in Fig. 5a, user draws a surrounding box around a pattern manually, and the coordinates of surrounding are registered into a CSV file automatically, then in Fig. 5b, user inserts the class number from 1 to 9 manually and it is registered in the CSV file automatically. After all patterns in a sample of the OBGET dataset are labeled semi-automatically, user should announce the program to save and close current CSV file and open a new CSV file for a new dataset sample. To do this task user can select and draw a random surrounding box and insert zero key to finish the current task as shown in Fig. 5c. Inserting zero key announce the proposed semi-automatic labeling program to close and save the current opened CSV file and named the file as same as related pattern. For continuing semi-automatic labeling, user can open another sample of the OBGET dataset and follow mentioned steps.

A part of OBGET dataset is published open access on the reserved https://doi.org/10.17632/62kwttmkcv.1. The comprehensive OBGET dataset samples include raw data, labeled data and metadata of are available if needed and requested.

3.3 Deep Learning

Patterns are classified by applying the proposed modified YOLO V5 as a deep learning method [107] with high accuracy. YOLO V5 [108,109,110] is an object detector [111, 112] which consists of three important parts: a) Backbone, b) Neck, and c) Head.

(a) Backbone extracts important features of an input image. The proposed method applied a CSPFootnote 5 network as a backbone model to extract features from an input image. (b) Neck helps to identify an object at different scales. The proposed modified YOLO V5 deployed PANet as a Neck model, and (c) Head is run for final detection. Generates final output vectors with class probability. Selecting an activation function for any deep neural network is crucial. This research applies Leaky ReLU as an activation function in the middle layer, and the Sigmoid activation function is deployed in the final detection layer. SGD is deployed as an Optimization Function, and Ultralytics calculates Binary Cross-Entropy with the Logit Loss function deploying PyTorch. The final model includes weights, biases, parameters, and gradients.

The proposed modified YOLO V5 classified OBGET dataset samples into nine classes. The proposed modified YOLO V5 includes architecture, activation, optimization, and loss functions. The final model includes weights, biases, parameters, and gradients. The proposed modified YOLO V5 network increased accuracy and solved the problem of detecting pattern number 2. YOLO is the most complete network for object detection and deep learning problems [112, 113].

In the proposed method, the batch size is 10 to analyze 10 images at each step of the training phase. Number of epochs is 300. The medium model is used in the proposed modified YOLO V5 with appropriate results, so there is no need to use large or very large models. Initial weights are random. The learning rate value is initially set to 0.01 and finally to 0.2. SGD momentum value is 0.937. Table 3 shows the initial parameters. The proposed MYOLO V5 algorithm is shown in Algorithm 1 according to [114].

Table 3 Values of parameters in the training phase of the proposed modified YOLO V5
Algorithm 1
figure a

Training phase for the proposed MYOLO V5 algorithm in the OBGET

The proposed system architecture is shown in Fig. 6.

Fig. 6
figure 6

The proposed system architecture

The Original Bender Gestalt test visualizes mental states with graphic shapes, and scoring is based on graphics rules, including:

  • Hand-sketching graphic shapes

  • Place of hand-sketching graphic shapes

  • Size of hand-sketching graphic shapes

  • Line thickness of hand-sketching graphic shapes

Associated rules for Tables 4 and 5 are as follows:

  • By calculating the area of ​​ the surrounding box for each pattern, the large or small size of patterns can be determined.

  • By examining the existence of a rectangle around each pattern, drawing a box around each pattern is determined.

  • If the distance between two surrounding boxes for two patterns is more or less than the default value, it means that the distance of drawing patterns is near or far.

  • Pattern rotation is detected according to the length and width of the surrounding box for each pattern.

  • Extra drawing occurs if some patterns are not categorized into nine specified classes.

Table 4 Mental disorder criteria for adult participants [1]
Table 5 Criteria of mental disorder for children participants [1]

In some patterns, the circle recognition function in OpenCV, imported in Python, is applied to detect dots or dashes instead of circles.

Inferential statistics evaluate OBGET dataset samples running SPSS version 21. The OBGET dataset is evaluated using inferential statistics, including hypothetical tests [103]. Chi-square analysis [103] evaluates descriptive statistics and relationships between variables considered for participants.

Values of all variables are not numerical, so Chi-square is used. Chi-square analysis examines the existence or absence of relationships between variables related to participants when all variables are not numerical.

4 Evaluation

4.1 Evaluating OBGET Pattern Classification Accuracy

Precision, Recall, and mAP criteria evaluated the proposed object detection and pattern classification on the OBGET dataset. The following results are obtained after implementing the proposed modified YOLO V5 on the OBGET dataset. Equations (1) and (2) explain the meaning of Precision and Recall in this research.

Also, the proposed method evaluates Precision and sensitivity (Recall) based on Eqs. 1 and 2.

$$\text{Precision }= \frac{TP}{TP+FP}=\frac{\text{number of true detected patterns}}{\text{number of detected patterns}}$$
(1)
$$\text{Sensitivity}=\text{Recall}=\frac{TP}{TP+FN}=\frac{\text{number of relevant detected patterns}}{\text{number of relevant patterns}}.$$
(2)

In object detection, mAP diagrams are obtained from Eq. (3), which provides important results.

$$\text{mAP }= \int \frac{precision}{recall}.$$
(3)

4.2 Evaluating OBGESS Accuracy

In this section, the automatic scoring phase of OBGESS is evaluated. This research implements automatic scoring by associated rules according to standard criteria scoring of the Original Bender Gestalt Test applying Open CV.

The diameter element values of the confusion matrix for each column are divided into the total number of tests according to Eq. (4) to calculate the OBGESS accuracy for detecting each mental disorder.

$$\frac{\sum_{j=1}^{d}\frac{{a}_{ij }, (i=j)}{\sum_{i=1}^{d}aij}\times 100}{d},$$
(4)

where i and j are counters, aij (i = j) is the elements on the diameter of the matrix, d is the number of rows or columns in the squared matrix, or, in other words, the number of detectable mental disorders by OBGESS mentioned above.

The Eq. \(\frac{{a}_{ij }, (i=j)}{\sum_{i=1}^{d}aij}\times 100\) calculates the OBGESS accuracy for detecting each mental disorder (The percentage of each column) and Eq. (4) calculates OBGESS's total accuracy for detecting all mental disorders detectable by OBGESS (the percentage of all columns). According to Eq. (4), to calculate the total OBGESS accuracy of mental disorder detection, the accuracy of each 15 mental disorders detection accuracy is averaged.

5 Result and Discussion

Segmentation and object detection are performed simultaneously (Fig. 7). YOLO V5 is a real-time approach that processes up to 45 images per second. After running the proposed modified YOLO V5 network on the OBGET dataset and reviewing the results, pattern detection accuracy is 95%. Six hundred fifty-four images were selected for the training and 163 for the testing phases. Figure 8 shows the pattern detection of OBGET dataset samples deploying the proposed modified YOLO V5.

Fig. 7
figure 7

Pattern detection of an OBGET dataset sample using the proposed modified YOLO V5

Fig. 8
figure 8

Pattern detection of OBGET samples using the proposed modified YOLOV5

The mental disorder detection phase was performed after pattern detection for each test using the Spider environment in Python. After the classification step, patterns are scored automatically, applying associated rules according to the standard criteria of the Original Bender Gestalt Test.

OBGESS extracts meaningful visual concepts about humans from the Original Bender Gestalt test accurately. This section presents the final phase of OBGESS and associated rules for automatic scoring. These rules are based on standard criteria for mental disorders for adult and children participants described in Tables 4 and 5.

This section discusses descriptive statistics of OBGET, OBGET pattern classification accuracy, and OBGESS accuracy.

5.1 OBGET Inferential Statistics

According to the following results:

  • A significant relationship exists between participants' age and test results (Fig. 9a).

  • There is no significant relationship between participants' gender, income status, marital status, number of children in the family, presence of parents, and test results.

  • There is a significant relation between education and test results variables (Fig. 9b).

Fig. 9
figure 9

a Diagram of relations between age and test results variables. b Diagram of relations between adult participants' education and test results variables

5.2 Comparing the Proposed Object Detection Results

In this section, the proposed MYOLO V5 object detection accuracy results are compared with ResNet 50 on the proposed OBGET dataset.

Figure 10 shows the confusion matrix for the proposed MYOLO V5 method.

Fig. 10
figure 10

Confusion matrix for the proposed MYOLO V5 method

mAP@0.5 is good for accurately detecting objects. In Fig. 11, mAP@0.5 is 95% and acceptable, indicating powerful object detection. Precision and Recall diagrams at best status are 95%.

Fig. 11
figure 11

Precision, recall, and mAP diagrams obtained from implementing the proposed modified YOLO V5 on the OBGET dataset with 817 data samples

Figure 11 shows Precision, Recall, and mAP diagrams obtained from implementing the proposed modified YOLO V5 on the OBGET dataset with 817 data samples.

Also, OBGET dataset samples are labeled manually by a psychologist. OBGESS results and psychology labels can be calculated by comparing OBGESS result's accuracy (Fig. 12).

Fig. 12
figure 12

Evaluating mental disorder detection accuracy for the proposed system

As shown in Fig. 12, mental disorder detection accuracy was evaluated manually with psychologist detection results and is 90% for the test dataset.

OBGESS accuracy on the OBGET dataset is evaluated. The Confusion Matrix evaluates it. A 7 × 7 square matrix is deployed to evaluate OBGESS accuracy using the proposed MYOLO V5 method (Fig. 13).

Fig. 13
figure 13

The confusion matrix to evaluate the pattern detection performance

Each row and column of the matrix is one of the mental disorders mentioned in Sect. 3.2.

We compared the proposed method MYOLO V5 with other methods in Table 6.

Table 6 Comparing the accuracy of the proposed method with other research methods

6 Conclusions and Future Work

Mental disorders affect the neural system and patients' daily physical and mental activities. The Original Bender Gestalt drawing test detects psychosomatic disorders. Automatic scoring of visual psychological tests can help detect mental disorders early. Early detection of mental disorders can prevent disorders from getting worse. OBGESS is a psychologist-assistant visual system. Interactive visual systems for detecting mental disorders need a comprehensive dataset of psychological tests. This work presents a comprehensive OBGET dataset.

Pre-processing and the proposed semi-automatic labeling phase were executed on 817 OBGET dataset samples. Chi-square is used to analyze data and consider whether there is a relation between variables for participants. The proposed modified YOLO V5 classifies patterns into nine classes. Each class includes one of the nine patterns from the Original Bender Gestalt drawing test. Pattern classification accuracy is 95%.

For graphical pattern detection and classification, Precision and Recall achieved 95%. Association rules apply for automatic mental disorders detection according to standard criteria. OBGESS accuracy is 90%. For future studies, we will try to automate the process of detecting mental disorders in the training phase at the same time as pattern detection. This is not in a separate phase. We will also attempt to increase OBGET dataset samples.