Deep learning framework for crater detection and identification on the Moon and Mars