The paper proposes a two-stage deep learning framework for brain tumor detection from MRI images. In the first step, DeepLabV3 segments the areas of possible tumors, and in the second step, the CNN classifies their presence. Transfer learning and model fine-tuning are used, tested on BraTS MRI data with SGD, RMSprop and Adam optimizers. The best result was achieved by the Adam optimizer with a classification accuracy of 99.31%, high precision and recall. Segmentation before classification ensures more reliable detection compared to single-stage models. The framework is interpretable, robust and suitable for cloud-based, secure and IoT clinical environments. It focuses on practical applicability, data management and healthcare deployment rather than tumor subtype diagnosis.