Skip to content

Commit

Permalink
Update Example 3 of D4.3 - Pre-processing.json
Browse files Browse the repository at this point in the history
  • Loading branch information
cozzolinoac11 authored May 3, 2024
1 parent 2bb2c52 commit 2d6f66b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stac/no-ml_items/Example 3 of D4.3 - Pre-processing.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
]
]
},
"bbox":[-180, -90, 180, 90],
"properties": {
"title": "JPEG images to numpy array transformation",
"description": "Building dataset as numpy array. In machine learning, Python uses image data in the format of a NumPy array, i.e., [Height, Width, Channel] format. Therefore, the images must be transformed in this format. In this case, the images are in JPEG format and, through pillow, NumPy and OpenCV functions, the transformation is performed. The cv2 package (OpenCV) has the method imread() which is used to load the image and it also reads the given image (PIL image) in the NumPy array format. Because the images within the dataset (i.e., the NumPy arrays) must all be the same size to be used, and as a matter of efficiency and calculation power, using cv2s resize() the images are resized from 350x350 pixels into 100x100 (this dimension can be easily changed). The channel is three because the images are RGB. This method then returns a dataset containing the images in the format of NumPy arrays and their respective class labels.",
Expand Down Expand Up @@ -90,4 +91,4 @@
]
}
}
}
}

0 comments on commit 2d6f66b

Please sign in to comment.