{"id":31960,"date":"2023-12-18T07:00:00","date_gmt":"2023-12-18T15:00:00","guid":{"rendered":"https:\/\/cloudinary.com\/blog\/?p=31960"},"modified":"2025-03-29T15:00:01","modified_gmt":"2025-03-29T22:00:01","slug":"large-scale-image-augmentation-python","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python","title":{"rendered":"Large-Scale Image Augmentation Techniques in Python"},"content":{"rendered":"\n<p>Images serve as crucial data for machine learning (ML) models, much like versatile tools in a craftsman&#8217;s kit. Yet, they often require tailored enhancements to meet the many demands of applications. Enter image augmentation \u2014 the process that equips these models with adaptability and resilience across diverse scenarios.<\/p>\n\n\n\n<p>Augmentation broadens the model&#8217;s learning spectrum. Consider training a facial expression recognition model that predominantly sees left-sided expressions. Now, if you flip those images, the machine suddenly gains exposure to right-sided expressions without needing entirely new images. Image augmentation bridges these gaps, providing a holistic view for comprehensive learning.<\/p>\n\n\n\n<p>Consider another scenario. Your machine needs to recognize objects under various lighting conditions. By automatically transforming images to vary their brightness and darkness, you can teach the model without investing in costly photo shoots.\u00a0<\/p>\n\n\n\n<p>In this article, we&#8217;ll introduce large-scale augmentation techniques in Python that not only cover your basic image augmentation needs, but also provide extended capabilities to enable you to apply precise, AI-powered augmentation to your images.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cloudinary: A Game-Changer in Image Augmentation<\/h2>\n\n\n\n<p>You might already use Python libraries for image augmentation, but have you explored Cloudinary?<\/p>\n\n\n\n<p>Cloudinary&#8217;s Python SDK offers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"#sample_code_snippets\">Familiar techniques<\/a><\/strong>. Leverage the techniques you&#8217;ve always used, like horizontal flipping to diversify angle recognition capabilities, brightness adjustment for flexibility with different lighting conditions, blur or sharpen effects for clarity variability, and rotation for adjustment to different orientations.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"#tailored_autmentation_piece_of_cade\">Tailored augmentation<\/a><\/strong>. Automatically customize your augmentations to specific images using Cloudinary&#8217;s object detection and intuitive AI-detected image characteristics.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"#generative_ai_awesomeness\">Generative AI<\/a><\/strong>. Empowering beyond convention with object removal, outpainting, and replacement. These unparalleled capabilities empower more effective machine learning.<\/li>\n<\/ul>\n\n\n\n<p>All supported by Cloudinary\u2019s infrastructure. Offload images for large-scale training, preventing slow processing or failure, regardless of dataset size.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Training Made Effortless<\/h2>\n\n\n\n<p>Here\u2019s what you need to do to use Cloudinary for augmenting your datasets:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sign up for a <a href=\"https:\/\/cloudinary.com\/users\/register\/free\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudinary<\/a> account.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install the Cloudinary Python library using <code>pip install cloudinary<\/code>.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Find your credentials in your <a href=\"https:\/\/console.cloudinary.com\/pm\/developer-dashboard\" target=\"_blank\" rel=\"noreferrer noopener\">Dashboard<\/a>.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Follow along with our sample <a href=\"https:\/\/colab.research.google.com\/drive\/1TcWIji8VUBMD9dJcMfzt-GtN5D9KTVtK?usp=sharing\" target=\"_blank\" rel=\"noreferrer noopener\">Jupyter Notebook<\/a>.<\/li>\n<\/ul>\n\n\n\n<p>OR<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use your own images in your Python environment:\n<ul class=\"wp-block-list\">\n<li>Configure Cloudinary in your <code>settings.py<\/code> with your credentials, ensuring they remain secure, then loop through your dataset and upload the images using the <a href=\"https:\/\/cloudinary.com\/documentation\/image_upload_api_reference#upload\">upload<\/a> method of the Upload API. Save the public IDs (unique identifier for the image in Cloudinary) and delivery URLs from the responses in an array.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Configure Cloudinary in your settings.py with your credentials, ensuring they remain secure.<\/span>\n<span class=\"hljs-comment\"># settings.py<\/span>\nimport cloudinary\nimport cloudinary.uploader\nimport cloudinary.api\nfrom cloudinary.utils import cloudinary_url\nimport cloudinary.api\t\ncloudinary.config( \n  \tcloud_name = <span class=\"hljs-string\">\"your_cloud_name\"<\/span>,\n  \tapi_key = <span class=\"hljs-string\">\"your_api_key\"<\/span>,\n  \tapi_secret = <span class=\"hljs-string\">\"your_api_secret\"<\/span>\n)\n\n<span class=\"hljs-comment\"># The upload statement for a single media asset.<\/span>\nresponse = cloudinary.uploader.upload(file, use_filename=<span class=\"hljs-keyword\">true<\/span>)\nimages.append({<span class=\"hljs-string\">'pubicId'<\/span>: response.public_id,<span class=\"hljs-string\">'url'<\/span>: response.secure_url})<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<div class='c-callout  c-callout--inline-title c-callout--note'><strong class='c-callout__title'>Note:<\/strong> <p>Replace <code>your_cloud_name<\/code>, <code>your_api_key<\/code>, and <code>your_api_secret<\/code> with your actual Cloudinary credentials, which you can find in your Cloudinary Dashboard.<\/p>\n<\/div>\n\n<div class='c-callout  c-callout--warning'><strong class='c-callout__title'>When writing your own applications, follow your organization&#8217;s policy on storing secrets and don&#8217;t expose your API secret.<\/strong> <\/div>\n\n\n<h2 class=\"wp-block-heading\">Tailored Augmentation? Piece of Cake!<\/h2>\n\n\n\n<p>Remember when we talked about tailored enhancements for specific images? Here&#8217;s an example. Let&#8217;s say you&#8217;re aiming to augment only images with faces \u2014 a task made easy with Cloudinary&#8217;s object detection. Tailored augmentation becomes a straightforward process, enhancing images based on their distinct features.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Code snippet for object detection-based augmentation <\/span>\ndetails = cloudinary.api.resource(<span class=\"hljs-string\">\"&lt;public_id&gt;\"<\/span>, faces=<span class=\"hljs-keyword\">True<\/span>)\nfacecount = len(details&#91;<span class=\"hljs-string\">'faces'<\/span>])\n\n<span class=\"hljs-keyword\">if<\/span> facecount &gt; <span class=\"hljs-number\">0<\/span>:\n    flipped_url, options = cloudinary.utils.cloudinary_url(<span class=\"hljs-string\">\"&lt;public_id&gt;\"<\/span>, transformation=&#91;\n        {<span class=\"hljs-string\">'angle'<\/span>: <span class=\"hljs-string\">'hflip'<\/span>}\n    ])\n    <span class=\"hljs-comment\"># Use 'flipped_url' for further processing or operations<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>You\u2019re not limited to face detection. Cloudinary&#8217;s powerful image analysis and object detection capabilities allow you to choose which images to augment based on a wide variety of characteristics. For more information, see <a href=\"https:\/\/cloudinary.com\/documentation\/cloudinary_ai_content_analysis_addon\" target=\"_blank\" rel=\"noreferrer noopener\">Coudinary AI Content Analysis<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img width=\"683\" height=\"1024\" data-public-id=\"Web_Assets\/blog\/surprise-1\/surprise-1.jpg\" loading=\"lazy\" decoding=\"async\" data-id=\"31964\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_683,h_1024,c_scale\/f_auto,q_auto\/v1701695913\/Web_Assets\/blog\/surprise-1\/surprise-1.jpg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31964\" data-format=\"jpg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701695913\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701695913\/Web_Assets\/blog\/surprise-1\/surprise-1.jpg?_i=AA 736w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701695913\/Web_Assets\/blog\/surprise-1\/surprise-1.jpg?_i=AA 200w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701695913\/Web_Assets\/blog\/surprise-1\/surprise-1.jpg?_i=AA 683w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><figcaption class=\"wp-element-caption\">Original Image<br><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/v1701710440\/surprise.jpg\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/res.cloudinary.com\/demo\/image\/upload\/surprise.jpg<\/a><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"683\" height=\"1024\" data-public-id=\"Web_Assets\/blog\/surprise\/surprise.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31963\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_683,h_1024,c_scale\/f_auto,q_auto\/v1701695916\/Web_Assets\/blog\/surprise\/surprise.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31963\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701695916\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701695916\/Web_Assets\/blog\/surprise\/surprise.jpeg?_i=AA 736w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701695916\/Web_Assets\/blog\/surprise\/surprise.jpeg?_i=AA 200w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701695916\/Web_Assets\/blog\/surprise\/surprise.jpeg?_i=AA 683w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><figcaption class=\"wp-element-caption\">Flipped Image<br><a href=\"http:\/\/res.cloudinary.com\/demo\/image\/upload\/a_hflip\/surprise\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/res.cloudinary.com\/demo\/image\/upload\/a_hflip\/surprise<\/a>.jpg<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Generative AI Awesomeness<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Object Removal<\/h3>\n\n\n\n<p>Cloudinary effectively removes and replaces unwanted elements in images, generating new training samples. This process enhances the model&#8217;s adaptability in interpreting scenes. For instance, removing obstructing parked cars from street scene images refines the model&#8217;s understanding of diverse real-world scenarios.<\/p>\n\n\n\n<p>You can specify one or more objects that you want to remove:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\">python\n<span class=\"hljs-comment\"># Code snippet for object removal <\/span>\nobject_removed_url, options = cloudinary.utils.cloudinary_url(<span class=\"hljs-string\">\"&lt;public_id&gt;\"<\/span>, transformation=&#91;\n    {<span class=\"hljs-string\">'effect'<\/span>: <span class=\"hljs-string\">'remove:prompt:parked_car'<\/span>, <span class=\"hljs-string\">'multiple'<\/span>: <span class=\"hljs-keyword\">True<\/span>}\n])\n<span class=\"hljs-comment\"># Use 'object_removed_url' for further processing or operations<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img width=\"1000\" height=\"667\" data-public-id=\"Web_Assets\/blog\/road_scene\/road_scene.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31965\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1000,h_667,c_scale\/f_auto,q_auto\/v1701700989\/Web_Assets\/blog\/road_scene\/road_scene.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31965\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701700989\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700989\/Web_Assets\/blog\/road_scene\/road_scene.jpeg?_i=AA 1000w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700989\/Web_Assets\/blog\/road_scene\/road_scene.jpeg?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700989\/Web_Assets\/blog\/road_scene\/road_scene.jpeg?_i=AA 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Original Image<br><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/v1701710441\/road_scene.jpg\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/res.cloudinary.com\/demo\/image\/upload\/road_scene.jpg<\/a><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1000\" height=\"667\" data-public-id=\"Web_Assets\/blog\/road_scene-1\/road_scene-1.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31966\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1000,h_667,c_scale\/f_auto,q_auto\/v1701700986\/Web_Assets\/blog\/road_scene-1\/road_scene-1.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31966\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701700986\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700986\/Web_Assets\/blog\/road_scene-1\/road_scene-1.jpeg?_i=AA 1000w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700986\/Web_Assets\/blog\/road_scene-1\/road_scene-1.jpeg?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700986\/Web_Assets\/blog\/road_scene-1\/road_scene-1.jpeg?_i=AA 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Object Removed:<br><a href=\"http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_gen_remove:prompt_parked_car;remove-shadow_true\/road_scene\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_gen_remove:prompt_parked_car;remove-shadow_true\/road_scene<\/a><\/figcaption><\/figure>\n<\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Outpainting<\/h3>\n\n\n\n<p>Outpainting, a technique powered by Cloudinary, broadens an image&#8217;s perspective. It extends the canvas around focused objects, like birds, enhancing the model&#8217;s accuracy in detecting them amidst varied backgrounds.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\">python\n<span class=\"hljs-comment\"># Code snippet for generative fill <\/span>\noutpaint_url, options = cloudinary.utils.cloudinary_url(<span class=\"hljs-string\">\"docs\/bird.jpg\"<\/span>, \n    transformation=&#91;\n        {<span class=\"hljs-string\">'aspect_ratio'<\/span>: <span class=\"hljs-string\">\"16:9\"<\/span>, <span class=\"hljs-string\">'background'<\/span>: <span class=\"hljs-string\">\"gen_fill\"<\/span>, <span class=\"hljs-string\">'width'<\/span>: <span class=\"hljs-number\">1500<\/span>, <span class=\"hljs-string\">'crop'<\/span>: <span class=\"hljs-string\">\"pad\"<\/span>}\n    ]\n)\n<span class=\"hljs-comment\"># Use 'outpaint_url' for further processing or operations<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-7 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img width=\"465\" height=\"279\" data-public-id=\"Web_Assets\/blog\/bird\/bird.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31967\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_465,h_279,c_scale\/f_auto,q_auto\/v1701700984\/Web_Assets\/blog\/bird\/bird.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31967\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701700984\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700984\/Web_Assets\/blog\/bird\/bird.jpeg?_i=AA 465w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700984\/Web_Assets\/blog\/bird\/bird.jpeg?_i=AA 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><figcaption class=\"wp-element-caption\">Original Image<br><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/v1701710442\/bird.jpg\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/res.cloudinary.com\/demo\/image\/upload\/bird.jpg<\/a><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"768\" height=\"1024\" data-public-id=\"Web_Assets\/blog\/bird-1\/bird-1.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31968\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_768,h_1024,c_scale\/f_auto,q_auto\/v1701700980\/Web_Assets\/blog\/bird-1\/bird-1.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31968\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701700980\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700980\/Web_Assets\/blog\/bird-1\/bird-1.jpeg?_i=AA 1500w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700980\/Web_Assets\/blog\/bird-1\/bird-1.jpeg?_i=AA 225w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700980\/Web_Assets\/blog\/bird-1\/bird-1.jpeg?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701700980\/Web_Assets\/blog\/bird-1\/bird-1.jpeg?_i=AA 1152w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><figcaption class=\"wp-element-caption\">Outpainted<br><a href=\"http:\/\/res.cloudinary.com\/demo\/image\/upload\/ar_9:12,b_gen_fill,c_pad,w_1500\/bird\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/res.cloudinary.com\/demo\/image\/upload\/ar_9:12,b_gen_fill,c_pad,w_1500\/bird<\/a><\/figcaption><\/figure>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Sample Code Snippets<\/h2>\n\n\n\n<p>These code snippets demonstrate Cloudinary&#8217;s transformation capabilities for various basic augmentations, from adjusting lighting to applying blur\/sharpen effects and rotating images at different angles.<\/p>\n\n\n\n<p>Replace <code>&lt;public_id&gt;<\/code> with the public ID of your image.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Adjusting Lighting<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Adjust the lighting to evening <\/span>\nevening_url, options = cloudinary.utils.cloudinary_url(<span class=\"hljs-string\">'&lt;public_id&gt;'<\/span>, transformation=&#91;\n   {<span class=\"hljs-string\">'effect'<\/span>: <span class=\"hljs-string\">\"art:frost\"<\/span>}\n])\n<span class=\"hljs-comment\"># Use 'evening_url' for further processing or operations<\/span>\n\n<span class=\"hljs-comment\"># Adjust lighting to morning<\/span>\nmorning_url, options = cloudinary.utils.cloudinary_url(<span class=\"hljs-string\">'&lt;public_id&gt;'<\/span>, transformation=&#91;\n   {<span class=\"hljs-string\">'effect'<\/span>: <span class=\"hljs-string\">\"art:sizzle\"<\/span>}\n])\n<span class=\"hljs-comment\"># Use 'morning_url' for further processing or operations<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-9 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"618\" data-public-id=\"Web_Assets\/blog\/indoor_scene10\/indoor_scene10.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31988\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_618,c_scale\/f_auto,q_auto\/v1701712550\/Web_Assets\/blog\/indoor_scene10\/indoor_scene10.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31988\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701712550\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701712550\/Web_Assets\/blog\/indoor_scene10\/indoor_scene10.jpeg?_i=AA 1588w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701712550\/Web_Assets\/blog\/indoor_scene10\/indoor_scene10.jpeg?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701712550\/Web_Assets\/blog\/indoor_scene10\/indoor_scene10.jpeg?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701712550\/Web_Assets\/blog\/indoor_scene10\/indoor_scene10.jpeg?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701712550\/Web_Assets\/blog\/indoor_scene10\/indoor_scene10.jpeg?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Original Image<br><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/v1701710445\/indoor_scene.jpg\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/res.cloudinary.com\/demo\/image\/upload\/indoor_scene.jpg<\/a><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"618\" data-public-id=\"Web_Assets\/blog\/indoor_scene-1\/indoor_scene-1.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31972\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_618,c_scale\/f_auto,q_auto\/v1701706292\/Web_Assets\/blog\/indoor_scene-1\/indoor_scene-1.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31972\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701706292\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706292\/Web_Assets\/blog\/indoor_scene-1\/indoor_scene-1.jpeg?_i=AA 1588w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706292\/Web_Assets\/blog\/indoor_scene-1\/indoor_scene-1.jpeg?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706292\/Web_Assets\/blog\/indoor_scene-1\/indoor_scene-1.jpeg?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706292\/Web_Assets\/blog\/indoor_scene-1\/indoor_scene-1.jpeg?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706292\/Web_Assets\/blog\/indoor_scene-1\/indoor_scene-1.jpeg?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Evening Light<br><a href=\"http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_art:frost\/indoor_scene\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_art:frost\/indoor_scene<\/a><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"618\" data-public-id=\"Web_Assets\/blog\/indoor_scene-2\/indoor_scene-2.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31974\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_618,c_scale\/f_auto,q_auto\/v1701706296\/Web_Assets\/blog\/indoor_scene-2\/indoor_scene-2.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31974\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701706296\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706296\/Web_Assets\/blog\/indoor_scene-2\/indoor_scene-2.jpeg?_i=AA 1588w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706296\/Web_Assets\/blog\/indoor_scene-2\/indoor_scene-2.jpeg?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706296\/Web_Assets\/blog\/indoor_scene-2\/indoor_scene-2.jpeg?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706296\/Web_Assets\/blog\/indoor_scene-2\/indoor_scene-2.jpeg?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706296\/Web_Assets\/blog\/indoor_scene-2\/indoor_scene-2.jpeg?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Morning Light<br><a href=\"http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_art:sizzle\/indoor_scene\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_art:sizzle\/indoor_scene<\/a><\/figcaption><\/figure>\n<\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Applying Blur and Sharpen Effects<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Blur<\/span>\nblurred_url, options = cloudinary.utils.cloudinary_url(<span class=\"hljs-string\">'&lt;public_id&gt;'<\/span>, transformation=&#91;\n    {<span class=\"hljs-string\">'effect'<\/span>: <span class=\"hljs-string\">'blur:300'<\/span>}\n])\n<span class=\"hljs-comment\"># Use 'blurred_url' for further processing or operations<\/span>\n\n\n<span class=\"hljs-comment\">#Sharpen<\/span>\nblurred_url, options = cloudinary.utils.cloudinary_url(<span class=\"hljs-string\">'&lt;public_id&gt;'<\/span>, transformation=&#91;\n    {<span class=\"hljs-string\">'effect'<\/span>: <span class=\"hljs-string\">'sharpen:100'<\/span>}\n])\n<span class=\"hljs-comment\"># Use 'blurred_url' for further processing or operations<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-11 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"618\" data-public-id=\"Web_Assets\/blog\/indoor_scene-3\/indoor_scene-3.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31975\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_618,c_scale\/f_auto,q_auto\/v1701706284\/Web_Assets\/blog\/indoor_scene-3\/indoor_scene-3.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31975\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701706284\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706284\/Web_Assets\/blog\/indoor_scene-3\/indoor_scene-3.jpeg?_i=AA 1588w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706284\/Web_Assets\/blog\/indoor_scene-3\/indoor_scene-3.jpeg?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706284\/Web_Assets\/blog\/indoor_scene-3\/indoor_scene-3.jpeg?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706284\/Web_Assets\/blog\/indoor_scene-3\/indoor_scene-3.jpeg?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706284\/Web_Assets\/blog\/indoor_scene-3\/indoor_scene-3.jpeg?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Blur Effect<br><a href=\"http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_blur:500\/indoor_scene\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_blur:500\/indoor_scene<\/a><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"618\" data-public-id=\"Web_Assets\/blog\/indoor_scene-4\/indoor_scene-4.jpeg\" loading=\"lazy\" decoding=\"async\" data-id=\"31976\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_618,c_scale\/f_auto,q_auto\/v1701706279\/Web_Assets\/blog\/indoor_scene-4\/indoor_scene-4.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31976\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701706279\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706279\/Web_Assets\/blog\/indoor_scene-4\/indoor_scene-4.jpeg?_i=AA 1588w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706279\/Web_Assets\/blog\/indoor_scene-4\/indoor_scene-4.jpeg?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706279\/Web_Assets\/blog\/indoor_scene-4\/indoor_scene-4.jpeg?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706279\/Web_Assets\/blog\/indoor_scene-4\/indoor_scene-4.jpeg?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706279\/Web_Assets\/blog\/indoor_scene-4\/indoor_scene-4.jpeg?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Sharpen Effect<br><a href=\"http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_sharpen:100\/indoor_scene\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/res.cloudinary.com\/demo\/image\/upload\/e_sharpen:100\/indoor_scene<\/a><\/figcaption><\/figure>\n<\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Rotating Images at Different Angles<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Rotate<\/span>\nrotated_url, options = cloudinary.utils.cloudinary_url(<span class=\"hljs-string\">'&lt;public_id&gt;'<\/span>, transformation=&#91;\n    {<span class=\"hljs-string\">'angle'<\/span>: <span class=\"hljs-number\">20<\/span>}\n])\n<span class=\"hljs-comment\"># Use 'rotated_url' for further processing or operations<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img width=\"773\" height=\"1024\" data-public-id=\"Web_Assets\/blog\/surprise-1_319778b90b\/surprise-1_319778b90b.jpeg\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_773,h_1024,c_scale\/f_auto,q_auto\/v1701706276\/Web_Assets\/blog\/surprise-1_319778b90b\/surprise-1_319778b90b.jpeg?_i=AA\" alt=\"\" class=\"wp-post-31960 wp-image-31977\" data-format=\"jpeg\" data-transformations=\"f_auto,q_auto\" data-version=\"1701706276\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706276\/Web_Assets\/blog\/surprise-1_319778b90b\/surprise-1_319778b90b.jpeg?_i=AA 916w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706276\/Web_Assets\/blog\/surprise-1_319778b90b\/surprise-1_319778b90b.jpeg?_i=AA 226w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706276\/Web_Assets\/blog\/surprise-1_319778b90b\/surprise-1_319778b90b.jpeg?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701706276\/Web_Assets\/blog\/surprise-1_319778b90b\/surprise-1_319778b90b.jpeg?_i=AA 773w\" sizes=\"auto, (max-width: 773px) 100vw, 773px\" \/><figcaption class=\"wp-element-caption\">Rotated Image<br><a href=\"http:\/\/res.cloudinary.com\/demo\/image\/upload\/a_10\/surprise\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/res.cloudinary.com\/demo\/image\/upload\/a_10\/surprise<\/a><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Invigorate Your Image Augmentation Process<\/h2>\n\n\n\n<p>Image augmentation is essential for training robust computer vision models, enabling them to learn from a rich tapestry of image variations. With <a href=\"https:\/\/cloudinary.com\/users\/register_free\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudinary&#8217;s<\/a> Python SDK, equipped with powerful infrastructure, cutting-edge AI techniques and the ability to handle images at an immense scale, training becomes streamlined, empowering models to grasp the intricacies of complex images.&nbsp;<\/p>\n\n\n\n<p>Ready to elevate your machine learning capabilities? Explore large-scale augmentation techniques in Python and revolutionize your model training today.<\/p>\n\n\n\n<p>If you found this article helpful and want to discuss it in more detail, head over to&nbsp;<a href=\"https:\/\/community.cloudinary.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudinary Community<\/a>&nbsp;forum and its associated&nbsp;<a href=\"https:\/\/discord.gg\/cloudinary\" target=\"_blank\" rel=\"noreferrer noopener\">Discord<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Images serve as crucial data for machine learning (ML) models, much like versatile tools in a craftsman&#8217;s kit. Yet, they often require tailored enhancements to meet the many demands of applications. Enter image augmentation \u2014 the process that equips these models with adaptability and resilience across diverse scenarios. Augmentation broadens the model&#8217;s learning spectrum. Consider [&hellip;]<\/p>\n","protected":false},"author":52,"featured_media":32119,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[409,370],"class_list":["post-31960","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-generative-ai","tag-image"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Large-Scale Image Augmentation Techniques in Python<\/title>\n<meta name=\"description\" content=\"Images serve as crucial data for machine learning (ML) models, much like versatile tools in a craftsman&#039;s kit. Yet, they often require tailored Maximize Python&#039;s potential with Cloudinary for large-scale augmentation, including tailored techniques and generative AI application.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Large-Scale Image Augmentation Techniques in Python\" \/>\n<meta property=\"og:description\" content=\"Images serve as crucial data for machine learning (ML) models, much like versatile tools in a craftsman&#039;s kit. Yet, they often require tailored Maximize Python&#039;s potential with Cloudinary for large-scale augmentation, including tailored techniques and generative AI application.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-18T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-29T22:00:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog-jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1100\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"sharonyelenik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python\"},\"author\":{\"name\":\"sharonyelenik\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/dc4e70df8d22a9cfdad676a82fa92a73\"},\"headline\":\"Large-Scale Image Augmentation Techniques in Python\",\"datePublished\":\"2023-12-18T15:00:00+00:00\",\"dateModified\":\"2025-03-29T22:00:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python\"},\"wordCount\":895,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA\",\"keywords\":[\"Generative AI\",\"Image\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2023\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python\",\"url\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python\",\"name\":\"Large-Scale Image Augmentation Techniques in Python\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA\",\"datePublished\":\"2023-12-18T15:00:00+00:00\",\"dateModified\":\"2025-03-29T22:00:01+00:00\",\"description\":\"Images serve as crucial data for machine learning (ML) models, much like versatile tools in a craftsman's kit. Yet, they often require tailored Maximize Python's potential with Cloudinary for large-scale augmentation, including tailored techniques and generative AI application.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA\",\"width\":2000,\"height\":1100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Large-Scale Image Augmentation Techniques in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/dc4e70df8d22a9cfdad676a82fa92a73\",\"name\":\"sharonyelenik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6565cdd768a04e9b6ea3932764886209dd9de8baeeef1504eaad8fe776677f92?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6565cdd768a04e9b6ea3932764886209dd9de8baeeef1504eaad8fe776677f92?s=96&d=mm&r=g\",\"caption\":\"sharonyelenik\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Large-Scale Image Augmentation Techniques in Python","description":"Images serve as crucial data for machine learning (ML) models, much like versatile tools in a craftsman's kit. Yet, they often require tailored Maximize Python's potential with Cloudinary for large-scale augmentation, including tailored techniques and generative AI application.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python","og_locale":"en_US","og_type":"article","og_title":"Large-Scale Image Augmentation Techniques in Python","og_description":"Images serve as crucial data for machine learning (ML) models, much like versatile tools in a craftsman's kit. Yet, they often require tailored Maximize Python's potential with Cloudinary for large-scale augmentation, including tailored techniques and generative AI application.","og_url":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python","og_site_name":"Cloudinary Blog","article_published_time":"2023-12-18T15:00:00+00:00","article_modified_time":"2025-03-29T22:00:01+00:00","og_image":[{"width":2000,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog-jpg?_i=AA","type":"image\/jpeg"}],"author":"sharonyelenik","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python"},"author":{"name":"sharonyelenik","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/dc4e70df8d22a9cfdad676a82fa92a73"},"headline":"Large-Scale Image Augmentation Techniques in Python","datePublished":"2023-12-18T15:00:00+00:00","dateModified":"2025-03-29T22:00:01+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python"},"wordCount":895,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA","keywords":["Generative AI","Image"],"inLanguage":"en-US","copyrightYear":"2023","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python","url":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python","name":"Large-Scale Image Augmentation Techniques in Python","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA","datePublished":"2023-12-18T15:00:00+00:00","dateModified":"2025-03-29T22:00:01+00:00","description":"Images serve as crucial data for machine learning (ML) models, much like versatile tools in a craftsman's kit. Yet, they often require tailored Maximize Python's potential with Cloudinary for large-scale augmentation, including tailored techniques and generative AI application.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA","width":2000,"height":1100},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/large-scale-image-augmentation-python#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Large-Scale Image Augmentation Techniques in Python"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/dc4e70df8d22a9cfdad676a82fa92a73","name":"sharonyelenik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6565cdd768a04e9b6ea3932764886209dd9de8baeeef1504eaad8fe776677f92?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6565cdd768a04e9b6ea3932764886209dd9de8baeeef1504eaad8fe776677f92?s=96&d=mm&r=g","caption":"sharonyelenik"}}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701814727\/python_image_Augmentation_scale-Blog\/python_image_Augmentation_scale-Blog.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/31960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=31960"}],"version-history":[{"count":27,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/31960\/revisions"}],"predecessor-version":[{"id":37286,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/31960\/revisions\/37286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/32119"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=31960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=31960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=31960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}