Identify credit card shape using machine learning
I am only concerned about finding the outline of card in an image and isolating the outline of card from rest of the image.

This can be efficiently solved by semantic segmentation (aka dense prediction) - problem in which every pixel must be labeled with class.
In your case, you will have 2 classes: credit card and background. And you will need to have annotated dataset in such way: for every image, every pixel should have a class label. If you will be annotating it manually, I guess that credit cards (because of their simple shape) can be annotated easily.
Here is a good solution in Keras for semantic segmentation models. It offers a lot of different architectures and backbones and it will be straightforward to apply it to your problem.
There are also implementations in other frameworks on the web.