Methods for deriving an intra prediction mode based on an inter prediction signal are disclosed. In the present embodiments, an image decoding device determines a motion vector for a current block from a motion vector candidate list for the current block and generates an inter prediction signal for the current block based on a reference block indicated by the motion vector for the current block. The image decoding device derives an intra prediction mode for the current block based on the reference block and a template for the reference block and generates an intra prediction signal for the current block based on the intra prediction mode. The image decoding device generates a final prediction signal for the current block based on the inter prediction signal and the intra prediction signal.