A program stored in a recording medium to perform a method for sampling a learning target frame image in a video for AI video learning, using a computer being hardware, the program for performing the method comprising:
- receiving a raw video for the AI image learning;
- extracting a predetermined number of frame images from the received raw video per predetermined time interval;
- detecting one or more learning target objects, each of which has one or more predetermined types, in each of the frame images by using an object detection algorithm;
- removing a background other than the learning target objects from each of the frame images;
- measuring a movement amount of each of the detected one or more learning target objects in a n-th frame image (′n′ being a natural number of 2 or more) by comparing a location of each of the detected one or more learning target objects in the n-th frame image, from which the background is removed, with a location of each of the detected one or more learning target objects in a (n−1)-th frame image, from which the background is removed and which is immediately before the n-th frame image;
- and
- selecting the n-th frame image as the learning target frame image, by comparing a result of measuring the movement amount of each of the detected one or more learning target objects in the n-th frame image with a predetermined reference.