stevenbucaille commited on
Commit
ce2ea97
·
verified ·
1 Parent(s): fb26f31

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -10
README.md CHANGED
@@ -81,10 +81,10 @@ import torch
81
  from PIL import Image
82
  import requests
83
 
84
- url = "https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/assets/phototourism_sample_images/london_bridge_78916675_4568141288.jpg?raw=true"
85
- im1 = Image.open(requests.get(url, stream=True).raw)
86
- url = "https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/assets/phototourism_sample_images/london_bridge_19481797_2295892421.jpg?raw=true"
87
- im2 = Image.open(requests.get(url, stream=True).raw)
88
  images = [im1, im2]
89
 
90
  processor = AutoImageProcessor.from_pretrained("stevenbucaille/superglue_indoor")
@@ -103,10 +103,10 @@ import torch
103
  from PIL import Image
104
  import requests
105
 
106
- url_image_1 = "https://github.com/cvg/LightGlue/blob/main/assets/sacre_coeur1.jpg?raw=true"
107
- image_1 = Image.open(requests.get(url_image_1, stream=True).raw)
108
- url_image_2 = "https://github.com/cvg/LightGlue/blob/main/assets/sacre_coeur2.jpg?raw=true"
109
- image_2 = Image.open(requests.get(url_image_2, stream=True).raw)
110
 
111
  images = [image_1, image_2]
112
 
@@ -132,7 +132,7 @@ image1_matching_scores = outputs.matching_scores[0, 1][image1_indices]
132
 
133
  You can use the `post_process_keypoint_matching` method from the `SuperGlueImageProcessor` to get the keypoints and matches in a more readable format:
134
  ```python
135
- image_sizes = [(image.height, image.width) for image in images]
136
  outputs = processor.post_process_keypoint_matching(outputs, image_sizes)
137
  for i, output in enumerate(outputs):
138
  print("For the image pair", i)
@@ -182,7 +182,7 @@ plt.savefig("matched_image.png", dpi=300, bbox_inches='tight')
182
  plt.close()
183
  ```
184
 
185
- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/632885ba1558dac67c440aa8/01ZYaLB1NL5XdA8u7yCo4.png)
186
 
187
  ## Training Details
188
 
 
81
  from PIL import Image
82
  import requests
83
 
84
+ url_image1 = "https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/assets/scannet_sample_images/scene0758_00_frame-000510.jpg?raw=true"
85
+ image1 = Image.open(requests.get(url_image1, stream=True).raw)
86
+ url_image2 = "https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/assets/scannet_sample_images/scene0758_00_frame-000165.jpg?raw=true"
87
+ image2 = Image.open(requests.get(url_image2, stream=True).raw)
88
  images = [im1, im2]
89
 
90
  processor = AutoImageProcessor.from_pretrained("stevenbucaille/superglue_indoor")
 
103
  from PIL import Image
104
  import requests
105
 
106
+ url_image1 = "https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/assets/scannet_sample_images/scene0758_00_frame-000510.jpg?raw=true"
107
+ image1 = Image.open(requests.get(url_image1, stream=True).raw)
108
+ url_image2 = "https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/assets/scannet_sample_images/scene0758_00_frame-000165.jpg?raw=true"
109
+ image2 = Image.open(requests.get(url_image2, stream=True).raw)
110
 
111
  images = [image_1, image_2]
112
 
 
132
 
133
  You can use the `post_process_keypoint_matching` method from the `SuperGlueImageProcessor` to get the keypoints and matches in a more readable format:
134
  ```python
135
+ image_sizes = [[(image.height, image.width) for image in images]]
136
  outputs = processor.post_process_keypoint_matching(outputs, image_sizes)
137
  for i, output in enumerate(outputs):
138
  print("For the image pair", i)
 
182
  plt.close()
183
  ```
184
 
185
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/632885ba1558dac67c440aa8/OrOJQ19s3R8LuG11uzH1R.png)
186
 
187
  ## Training Details
188