Functional magnetic resonance imaging (fMRI) is a neuroimaging technique that uses MRI technology to quantify brain activity by detecting changes in blood flow and applying the Blood-oxygen-level dependent (BOLD) contrast. Current neuroscience research suggests a modular brain structure. To understand the complex patterns of interaction between brain areas. The proposed system makes use of the CNN algorithm, which is an efficient method for dividing segmentation. A brain area is defined as a collection of subjects who exhibit a similar pattern of interaction between their brain areas. A thorough experimental examination utilizing benchmark data demonstrates that our technique is both effective and efficient. Two real-world fMRI studies found that the rifleman technique has the potential to improve comprehension of both normal brain activity and the abnormalities associated with psychiatric diseases. That is, mental diseases are typically defined by How an individual feels, acts, thinks, or perceives events. This is typically linked to specific areas or functions of the brain or the rest of the nervous system. This is unacceptable for a variety of time series sectors. As a result, we provide the statistical region merging approach, which is applied to picture segmentation. The method evaluates the values inside a regional range and combines them using the merging criteria, resulting in a smaller list. . As a result, we gather additional information and compare the findings to those already in the database. As a result, we decide if a person is normal or aberrant, as well as whether they are unwell.