gaocong13 / Projective-Spatial-Transformers

Generalizing Spatial Transformers to Projective Geometry with Applications to 2D/3D Registration
117 stars 21 forks source link

AttributeError: module 'geomstats.geometry.riemannian_metric' has no attribute 'loss' #18

Closed TUYaYa1 closed 2 years ago

TUYaYa1 commented 2 years ago

Hello, When I ran train.py, the following error occurred: "AttributeError: module 'geomstats.geometry.riemannian_metric' has no attribute 'loss'". But Package "geomstats" has been successfully installed. Can you help me solve this problem?

gaocong13 commented 2 years ago

Hello, @TUYaYa1, this is most likely due to the version compatibility of the geomstats package. The function structures may have changed. I recommend you double check your geomstats version. If you have decided to go for its latest one, please search the riemannian metric function and loss in its web wiki and adapt to its current format. Please keep me posted how it goes.

TUYaYa1 commented 2 years ago

Thanks, I successfully run the code with package geomstats == 1.22

gaocong13 commented 2 years ago

Glad to hear, thanks

TUYaYa1 commented 2 years ago

I have another question. How did you get the Gt in your paper? The description in your paper is "Grid sampling transformer—Our Projective Spatial Transformer (ProST) extends the canonical projection geometry by learning a transformation of the control points G. Given θ ∈ SE(3), we obtain a transformed set of control points via the affine transformation matrix T(θ): Gt = T(θ) ⋅ G". I want to ask how is it implemented in code? I can't find the corresponding code, can you help me solve it?

gaocong13 commented 2 years ago

During training, both moving and target images are generated in simulation, actually just using ProST. Thus, the target image pose, which we call it 'groundtruth' pose (gt), is generated during ProST forward projection.

TUYaYa1 commented 2 years ago

Thanks, I see. Best wishes.

victorswan commented 2 years ago

geomstats must be 2.2.1 for me