Detection of anonymous behavior is a method of detecting the behavior of people who are insignificant. By using video surveillance and anomaly detection, it is possible to automatically see when something that does not fit the usual pattern is captured by the camera. Although it is a challenging task, it is crucial to automate, improve, and lower expenses in order to detect crimes and other calamities. In this paper, a novel YOLO-Robbery network has been introduced for enhance the security by identifying the threat activities in the supermarket and send the alert message to the shop owner automatically. Initially, the surveillance camera's real-time footage is collected and transformed into image frames for subsequent processing. These frames are pre-processed using multi-scale retinex to remove distortions and augmented to increase the data frames. This work utilizes the YOLO V7 network to extract features from surveillance camera images to quite effective at recognizing and classifying threats at supermarket. Finally, Greedy snake optimization is used to fine-tune the hyperparameters of YOLO V7 network it is trained using DCSASS dataset for efficient image recognition and the alert message is sent to the shop owner automatically. The proposed method has been simulated using MATLAB. The experimental result shows that the YOLO-Robbery method performance was evaluated using the DCSASS dataset in terms of accuracy, precision, recall, and specificity. The proposed YOLO-Robbery achieves the overall accuracy of 99.15%. The proposed YOLO-Robbery increases the overall accuracy range by 13.15%, 2.15%, and 6.24 better than CLSTM-NN, J. DCNN, and ANFIS respectively.