The present relates to a method and system for determining the positionand orientation of implants located in a body part of a patient. The methodandsystem comprise determining voxels having an intensity value corresponding toimplants in a three-dimensional radiographic representation of the body part.Themethod and system further comprise generating multiple random virtualimplants,providing a score for each virtual implant, until obtaining a score thatidentifiesimplants. The score is based on a number of voxels having an intensity valuecorresponding to implants contained in each generated virtual implant. And themethod and system comprise determining, based on the score of virtualimplants,the position and orientation of the implants located in the body part.