Skip to content

Commit

Permalink
Update Image Entity fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ibaiGorordo committed Aug 7, 2023
1 parent 531bb94 commit ab63bb6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ Fields:
14. thumb_256_url - string, URL to the 256px wide thumbnail
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
17. merge_cc - int, id of the connected component of images that were aligned together
18. mesh - { id: string, url: string } - URL to the mesh
19. quality_score - float, how good the image is (experimental)
17. thumb_original_url - string, URL to the original wide thumbnail.
18. merge_cc - int, id of the connected component of images that were aligned together
19. mesh - { id: string, url: string } - URL to the mesh
20. sequence - string, ID of the sequence
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
22. width - int, width of the original image uploaded
23. detections - detection entity, detections from the image
```


Expand Down
10 changes: 6 additions & 4 deletions docs/docs/mapillary/mapillary.interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,13 @@ Gets an image for the given key argument
16. thumb_2048_url - string, URL to the 2048px wide thumbnail


17. merge_cc - int, id of the connected component of images that were aligned
together
17. thumb_original_url - string, URL to the original wide thumbnail.


18. mesh - { id: string, url: string } - URL to the mesh
18. merge_cc - int, id of the connected component of images that were aligned together


19. quality_score - float, how good the image is (experimental)
19. mesh - { id: string, url: string } - URL to the mesh


20. sequence - string, ID of the sequence
Expand All @@ -375,6 +374,9 @@ Gets an image for the given key argument

22. width - int, width of the original image uploaded


23. detections - detection entity, detections from the image

Refer to [https://www.mapillary.com/developer/api-documentation/#image](https://www.mapillary.com/developer/api-documentation/#image) for more details


Expand Down
17 changes: 10 additions & 7 deletions src/mapillary/config/api/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ def get_image(image_id: str, fields: list) -> str:
14. thumb_256_url - string, URL to the 256px wide thumbnail
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
17. merge_cc - int, id of the connected component of images that were aligned together
18. mesh - { id: string, url: string } - URL to the mesh
19. quality_score - float, how good the image is (experimental)
17. thumb_original_url - string, URL to the original wide thumbnail.
18. merge_cc - int, id of the connected component of images that were aligned together
19. mesh - { id: string, url: string } - URL to the mesh
20. sequence - string, ID of the sequence
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
22. width - int, width of the original image uploaded
23. detections - detection entity, detections from the image
"""

fields = Entities.__field_validity(
Expand Down Expand Up @@ -134,12 +135,13 @@ def get_images(
14. thumb_256_url - string, URL to the 256px wide thumbnail
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
17. merge_cc - int, id of the connected component of images that were aligned together
18. mesh - { id: string, url: string } - URL to the mesh
19. quality_score - float, how good the image is (experimental)
17. thumb_original_url - string, URL to the original wide thumbnail.
18. merge_cc - int, id of the connected component of images that were aligned together
19. mesh - { id: string, url: string } - URL to the mesh
20. sequence - string, ID of the sequence
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
22. width - int, width of the original image uploaded
23. detections - detection entity, detections from the image
Raises::
Expand Down Expand Up @@ -379,12 +381,13 @@ def get_image_fields() -> list:
"thumb_256_url",
"thumb_1024_url",
"thumb_2048_url",
"thumb_original_url",
"merge_cc",
"mesh",
"quality_score",
"sequence",
"sfm_cluster",
"width",
"detections",
]

@staticmethod
Expand Down
8 changes: 4 additions & 4 deletions src/mapillary/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,13 +934,13 @@ def image_from_key(key: str, fields: list = []) -> str:
14. thumb_256_url - string, URL to the 256px wide thumbnail
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
17. merge_cc - int, id of the connected component of images that were aligned
together
18. mesh - { id: string, url: string } - URL to the mesh
19. quality_score - float, how good the image is (experimental)
17. thumb_original_url - string, URL to the original wide thumbnail.
18. merge_cc - int, id of the connected component of images that were aligned together
19. mesh - { id: string, url: string } - URL to the mesh
20. sequence - string, ID of the sequence
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
22. width - int, width of the original image uploaded
23. detections - detection entity, detections from the image
Refer to https://www.mapillary.com/developer/api-documentation/#image for more details
Expand Down
4 changes: 2 additions & 2 deletions tests/config/api/test_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ def test_search_for_images__fields_param__selected(operation, expected):
"38.41055825094609,45.336701909968134&fields=altitude,atomic_scale,"
"camera_parameters,camera_type,captured_at,compass_angle,computed_altitude,"
"computed_compass_angle,computed_geometry,computed_rotation,exif_orientation,"
"geometry,height,thumb_256_url,thumb_1024_url,thumb_2048_url,merge_cc,mesh,"
"quality_score,sequence,sfm,width"
"geometry,height,thumb_256_url,thumb_1024_url,thumb_2048_url,thumb_original_url,"
"merge_cc,mesh,sequence,sfm,width,detections"
),
)
],
Expand Down

0 comments on commit ab63bb6

Please sign in to comment.