I need a complete Python application that runs on a Raspberry Pi 5 and identifies plant-leaf diseases in real time from the Pi camera. The same core model must also accept still-image uploads. All three disease categories—Fungal, Bacterial and Viral—have to be recognised with reliable accuracy. The user interface will be a Django web app. Within that app I want three role levels—Admin, Standard user and Guest—each with appropriate permissions for running detections, reviewing results and managing data. Please structure the code so that REST endpoints are cleanly separated; this will let me expose the following Android-ready APIs later on: live-video analysis, image-file analysis and retrieval of disease-history logs. Deliverables • Python inference engine (TensorFlow/PyTorch + OpenCV acceptable) optimised for Raspberry Pi 5 • Django project with the described role system, templates and REST endpoints • Model-training notebook or script plus labeled dataset reference • Setup script or Dockerfile for one-step deployment on a fresh Pi • Brief README covering install, usage and endpoint documentation Acceptance criteria 1. Live camera stream on the Pi returns disease label and confidence <2 s per frame under normal lighting. 2. Image upload route returns the same JSON structure as the live stream. 3. Role permissions enforced: Guests read-only, Standard users run detections, Admin manages users/data. 4. Endpoints for Android are clearly namespaced and documented in Swagger or similar. Code quality, clarity and repeatability matter more to me than exotic UI design, so keep the front end simple and focus effort on robust detection and clean APIs.