move native methods to ImageNet class