Enhancing Precision of Object Detectors: Bridging Classification and Localization Gaps for 2D and 3D Models