In The Wireless Multimedia Sensor Network (WNSMs) have achieved popularity among diverse communities as a result of technological breakthroughs in sensor and current gadgets. By utilising portable technologies, it achieves solid and significant results in wireless communication, media transfer, and digital transmission. Sensor nodes have been used in agriculture and industry to detect characteristics such as temperature, moisture content, and other environmental conditions in recent decades. WNSMs have also made apps easier to use by giving devices self-governing access to send and process data connected with appropriate audio and video information. Many video sensor network studies focus on lowering power consumption and increasing transmission capacity, but the main demand is data reliability. Because of the obstacles in the sensor nodes, WMSN is subjected to a variety of attacks, including Denial of Service (DoS) attacks. Deep Convolutional Neural Network is designed with the state-action relationship mapping which is used to identify the DDOS Attackers present in the Wireless Sensor Networks for Smart Agriculture. The Proposed work it performs the data collection about the traffic conditions and identifies the deviation between the network conditions such as packet loss due to network congestion and the presence of attackers in the network. It reduces the attacker detection delay and improves the detection accuracy. In order to protect the network against DoS assaults, an improved machine learning technique must be offered. An efficient Deep Neural Network approach is provided for detecting DoS in WMSN. The required parameters are selected using an adaptive particle swarm optimization technique. The ratio of packet transmission, energy consumption, latency, network length, and throughput will be used to evaluate the approach's efficiency.