Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated image entity fields #155

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions docs/docs/mapillary.config.api/mapillary.config.api.entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,23 @@ Fields:
8. computed_compass_angle - float, compass angle after running image processing
9. computed_geometry - GeoJSON Point, location after running image processing
10. computed_rotation - enum, corrected orientation of the image
11. exif_orientation - enum, orientation of the camera as given by the exif tag
11. creator - the username and user ID who owns and uploaded the image
12. exif_orientation - enum, orientation of the camera as given by the exif tag
(see: https://sylvana.net/jpegcrop/exif_orientation.html)
12. geometry - GeoJSON Point geometry
13. height - int, height of the original image uploaded
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)
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
13. geometry - GeoJSON Point geometry
14. height - int, height of the original image uploaded
15. make - string, the manufacturer name of the camera device
16. model - string, the model or product series name of the camera device
17. thumb_256_url - string, URL to the 256px wide thumbnail
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
20. thumb_original_url - string, URL to the original wide thumbnail
21. merge_cc - int, id of the connected component of images that were aligned together
22. mesh - { id: string, url: string } - URL to the mesh
23. quality_score - float, how good the image is (experimental)
24. sequence - string, ID of the sequence
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
26. width - int, width of the original image uploaded
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there needs to be the mention for detections as well, given the last item under width for the fields under the Image entity,

https://www.mapillary.com/developer/api-documentation#image

image



Expand Down
36 changes: 24 additions & 12 deletions docs/docs/mapillary/mapillary.interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,42 +338,54 @@ Gets an image for the given key argument
10. computed_rotation - enum, corrected orientation of the image


11. exif_orientation - enum, orientation of the camera as given by the exif tag
11. creator - the username and user ID who owns and uploaded the image


12. exif_orientation - enum, orientation of the camera as given by the exif tag
(see: [https://sylvana.net/jpegcrop/exif_orientation.html](https://sylvana.net/jpegcrop/exif_orientation.html))


12. geometry - GeoJSON Point geometry
13. geometry - GeoJSON Point geometry


14. height - int, height of the original image uploaded


15. make - string, the manufacturer name of the camera device


16. model - string, the model or product series name of the camera device


13. height - int, height of the original image uploaded
17. thumb_256_url - string, URL to the 256px wide thumbnail


14. thumb_256_url - string, URL to the 256px wide thumbnail
18. thumb_1024_url - string, URL to the 1024px wide thumbnail


15. thumb_1024_url - string, URL to the 1024px wide thumbnail
19. thumb_2048_url - string, URL to the 2048px wide thumbnail


16. thumb_2048_url - string, URL to the 2048px wide thumbnail
20. thumb_original_url - string, URL to the original wide thumbnail


17. merge_cc - int, id of the connected component of images that were aligned
21. merge_cc - int, id of the connected component of images that were aligned
together


18. mesh - { id: string, url: string } - URL to the mesh
22. mesh - { id: string, url: string } - URL to the mesh


19. quality_score - float, how good the image is (experimental)
23. quality_score - float, how good the image is (experimental)


20. sequence - string, ID of the sequence
24. sequence - string, ID of the sequence


21. sfm_cluster - { id: string, url: string } - URL to the point cloud
25. sfm_cluster - { id: string, url: string } - URL to the point cloud


22. width - int, width of the original image uploaded
26. width - int, width of the original image uploaded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

Docs can be updated with the make docs-gen command as well to avoid manual updates. This also requires the detections item.


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

Expand Down
60 changes: 36 additions & 24 deletions src/mapillary/config/api/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,23 @@ def get_image(image_id: str, fields: list) -> str:
8. computed_compass_angle - float, compass angle after running image processing
9. computed_geometry - GeoJSON Point, location after running image processing
10. computed_rotation - enum, corrected orientation of the image
11. exif_orientation - enum, orientation of the camera as given by the exif tag
11. creator - the username and user ID who owns and uploaded the image
12. exif_orientation - enum, orientation of the camera as given by the exif tag
(see: https://sylvana.net/jpegcrop/exif_orientation.html)
12. geometry - GeoJSON Point geometry
13. height - int, height of the original image uploaded
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)
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
13. geometry - GeoJSON Point geometry
14. height - int, height of the original image uploaded
15. make - string, the manufacturer name of the camera device
16. model - string, the model or product series name of the camera device
17. thumb_256_url - string, URL to the 256px wide thumbnail
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
20. thumb_original_url - string, URL to the original wide thumbnail
21. merge_cc - int, id of the connected component of images that were aligned together
22. mesh - { id: string, url: string } - URL to the mesh
23. quality_score - float, how good the image is (experimental)
24. sequence - string, ID of the sequence
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
26. width - int, width of the original image uploaded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

"""

fields = Entities.__field_validity(
Expand Down Expand Up @@ -127,19 +131,23 @@ def get_images(
8. computed_compass_angle - float, compass angle after running image processing
9. computed_geometry - GeoJSON Point, location after running image processing
10. computed_rotation - enum, corrected orientation of the image
11. exif_orientation - enum, orientation of the camera as given by the exif tag
11. creator - the username and user ID who owns and uploaded the image
12. exif_orientation - enum, orientation of the camera as given by the exif tag
(see: https://sylvana.net/jpegcrop/exif_orientation.html)
12. geometry - GeoJSON Point geometry
13. height - int, height of the original image uploaded
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)
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
13. geometry - GeoJSON Point geometry
14. height - int, height of the original image uploaded
15. make - string, the manufacturer name of the camera device
16. model - string, the model or product series name of the camera device
17. thumb_256_url - string, URL to the 256px wide thumbnail
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
20. thumb_original_url - string, URL to the original wide thumbnail
21. merge_cc - int, id of the connected component of images that were aligned together
22. mesh - { id: string, url: string } - URL to the mesh
23. quality_score - float, how good the image is (experimental)
24. sequence - string, ID of the sequence
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
26. width - int, width of the original image uploaded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.


Raises::

Expand Down Expand Up @@ -373,12 +381,16 @@ def get_image_fields() -> list:
"computed_compass_angle",
"computed_geometry",
"computed_rotation",
"creator",
"exif_orientation",
"geometry",
"height",
"make",
"model",
"thumb_256_url",
"thumb_1024_url",
"thumb_2048_url",
"thumb_original_url",
"merge_cc",
"mesh",
"quality_score",
Expand Down
29 changes: 16 additions & 13 deletions src/mapillary/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,20 +927,23 @@ def image_from_key(key: str, fields: list = []) -> str:
8. computed_compass_angle - float, compass angle after running image processing
9. computed_geometry - GeoJSON Point, location after running image processing
10. computed_rotation - enum, corrected orientation of the image
11. exif_orientation - enum, orientation of the camera as given by the exif tag
11. creator - the username and user ID who owns and uploaded the image
12. exif_orientation - enum, orientation of the camera as given by the exif tag
(see: https://sylvana.net/jpegcrop/exif_orientation.html)
12. geometry - GeoJSON Point geometry
13. height - int, height of the original image uploaded
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)
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
13. geometry - GeoJSON Point geometry
14. height - int, height of the original image uploaded
15. make - string, the manufacturer name of the camera device
16. model - string, the model or product series name of the camera device
17. thumb_256_url - string, URL to the 256px wide thumbnail
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
20. thumb_original_url - string, URL to the original wide thumbnail
21. merge_cc - int, id of the connected component of images that were aligned together
22. mesh - { id: string, url: string } - URL to the mesh
23. quality_score - float, how good the image is (experimental)
24. sequence - string, ID of the sequence
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
26. width - int, width of the original image uploaded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well.


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 @@ -436,8 +436,8 @@ def test_search_for_images__fields_param__selected(operation, expected):
"https://graph.mapillary.com/images?bbox=62.22656249999999,48.1640625,"
"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,"
"computed_compass_angle,computed_geometry,computed_rotation,creator,exif_orientation,"
"geometry,height,make,model,thumb_256_url,thumb_1024_url,thumb_2048_url,thumb_original_url,merge_cc,mesh,"
"quality_score,sequence,sfm,width"
),
)
Expand Down