|
|
|
|
| import json |
|
|
| |
| annotation_data = { |
| "image_id": "image_000.jpg", |
|
|
| |
| "line_shape": { |
| "turns": 0, |
| "description": "Straight line" |
| }, |
|
|
| "start_of_line": { |
| "coordinates": [200, 400], |
|
|
| |
| "where_in_image_field_of_view": "center left", |
|
|
| "estimated_distance": 2.4 |
| }, |
|
|
| "end_of_line": { |
| "coordinates": [200, 400], |
|
|
| |
| "where_in_image_field_of_view": "far right", |
|
|
| "estimated_distance": 10, |
|
|
| "person_at_the_end": "Male, blue jacket", |
|
|
| "do_you_see_end": True, |
|
|
| "camera_rotation_suggestion": "Rotate right to view the end of the line" |
| }, |
|
|
| "people": { |
| "number_of_people": 10, |
|
|
| |
| "direction_they_are_facing": "center right" |
| }, |
|
|
| "higher_level_info": { |
| "line_purpose": "Theme park ride", |
| "estimated_waiting_time_minutes": 30 |
| }, |
|
|
| "boundary": { |
| "boundary_present": True, |
| "boundary_types": ["cones", "rope dividers", "stanchions"] |
| } |
| } |
|
|
| |
| file_path = '/Users/Jamila/Desktop/LineFinder/Annotations/image_000.json' |
|
|
| |
| with open(file_path, 'w') as file: |
| json.dump(annotation_data, file, indent=4) |
|
|
| print("JSON file has been created and saved.") |
|
|
|
|
|
|
|
|