To search for optical counterparts to gravitational waves, it is crucial to develop an efficient follow-up method that allows for both a quick telescopic scan of the event localization region and search through the resulting image data for plausible optical transients. We present a method to detect these transients based on an artificial neural network. We describe the architecture of two networks capable of comparing images of the same part of the sky taken by different telescopes. One image corresponds to the epoch in which a potential transient could exist; the other is a reference image of an earlier epoch. We use data obtained by the Dr. Cristina V. Torres Memorial Astronomical Observatory and archival reference images from the Sloan Digital Sky Survey. We trained a convolutional neural network and a dense layer network on simulated source samples and tested the trained networks on samples created from real image data. Autonomous detection methods replace the standard process of detecting transients, which is normally achieved by source extraction of a difference image followed by human inspection of the detected candidates. Replacing the human inspection component with an entirely autonomous method would allow for a rapid and automatic follow-up of interesting targets of opportunity. The method will be further tested on telescopes participating in the Transient Optical Robotic Observatory of the South Collaboration.