This paper proposes a 2D code and its decoding method robust against non-uniform, complicated distortions, assuming an application to automatic recognition of a plastic garbage bag. Printing a 2D code on a garbage bag is a promising approach for automatic bag recognition from the perspective of information content and cost. However, a 2D code printed on the bag causes non-uniform distortions because the bag is not rigid and does not hold a fixed shape. The proposed 2D code is based on Quick Response (QR) code and has auxiliary lines which allow recognition of distortion and occlusion areas, and the proposed decoding method localizes the lines by reliability calculation and iterated DP matching. Experimental results show that the proposed method in conjunction with the error correction function of QR code could decode the 2D code with non-uniform, non-smooth distortions and occluded areas.