-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hello @eigenvivek, thanks for sharing the code for your awesome work !
I have a query regarding the calculation of the mean Target Registration Error (mTRE) as discussed in your arXiv paper compared to its implementation in the code.
In the paper, the mTRE is described as the mean error of projected points on the detector, which suggests a measurement directly in the detector plane. However, in the code, it appears that these projected points are backprojected into deepfluoro's coordinate system prior to calculating the mean error, aligning the metric with anatomical coordinates.
DiffPose/diffpose/deepfluoro.py
Lines 178 to 189 in b3937c4
| def project(self, pose): | |
| extrinsic = convert_diffdrr_to_deepfluoro(self.specimen, pose) | |
| x = perspective_projection(extrinsic, self.intrinsic, self.fiducials) | |
| x = -self.specimen.focal_len * torch.einsum( | |
| "ij, bnj -> bni", | |
| self.intrinsic_inv, | |
| pad(x, (0, 1), value=1), # Convert to homogenous coordinates | |
| ) | |
| extrinsic = ( | |
| self.flip_xz.inverse().compose(self.translate.inverse()).compose(pose) | |
| ) | |
| return extrinsic.transform_points(x) |
Additionally, within the Evaluator.call method, the reprojection error calculated in this manner is subsequently multiplied by a factor of 0.194 mm/px.
DiffPose/diffpose/deepfluoro.py
Line 198 in b3937c4
| registration_error *= 0.194 # Pixel spacing is 0.194 mm / pixel isotropic |
Could you please clarify if this conversion is intended to standardize the error measurement to physical units for clinical relevancy, or if there might be an oversight in this part of the implementation?