The imitation of human visual memory demands the multifunctional integration of light sensors similar to the eyes, and image memory, similar to the brain. Although humans have already implemented electronic devices with visual memory functions, these devices require a combination of various components and logical circuits. However, the combinationof visual perception and high-performance information storage capabilities into a single device to achieve visual memory remains challenging. In this study, inspired by the function of human visual memory, a dual-functional perovskite-based photodetector (PD) and memristor are designed to realize visual perception and memory capacities. As a PD, it realizes an ultrahigh self-powered responsivity of 276mA W-1 , a high detectivity of 4.7×1011 Jones (530nm; light intensities, 2.34mWcm-2 ), and a high rectification ratio of ≈100 (±2V). As a memristor, an ultrahigh on/off ratio (≈105 ), an ultralow power consumption of 3×10-11 W, a low setting voltage (0.15V), and a long retention time (>7000s) are realized. Moreover, the dual-functional device has the capacity to perceive and remember light paths and store data with good cyclic stability. This device exhibits perceptual and cyclic erasable memory functions, which provides new opportunities for mimicking human visual memory in future multifunctional applications.