How to get AmlDatastore image url from Azure - azure

I'm trying to use auto ML to train an object detection model. I have all of my images uploaded to azure and am trying to create my jsonl file for the tabular dataset. I'm using this document: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models
This is their example of an image url: AmlDatastore://image_data/Image_01.png
How do I get that url for my images in my datastore? When I view the image in the datastore, it shows me an https url. I tried using that one but I get an error that the file is not found. I've also tried making an AmlDatastore url with a path to my image with no luck there either.

Related

Azure CDN Rewrite URL to index.html not working

I have a static website with one $web container and one more container named storybook containing a build in the $web container. Currently to reach the storybook container I have to write: www.xyz/storybook/index.hmtl.
The goal is to reach the Image when calling www.xyz/storybook.
To achieve this I tried to setup Rule Engines URL Rewrite.
My rule looks like this
Somehow the rewrite is not working and I have no idea why.
I tried to reproduce the same in my environment i am getting the same error as 404:
Thus, to resolve this issue, check whether you have provided correct Html error document path as below:
In $web container, I have added my error document path as abc.html file and my image files as well. In document path, try to add your image URL path as below:
Also, when I try to browse my primary endpoint URL, I am getting the image successfully as shown below. For this, make sure your container’s access level should be public container (anonymous read access for container and blobs) and I created azure CDN under security + networking.
Check whether you have given correct origin path default as below:
To access the image, copy the Endpoint hostname along with your image url path as below that is, Append with blob url (/$web/abc.html) by omitting origin hostname(https://imran955.blob.core.windows.net)
i.e., https://Endpointhostname/blob url
Result:

Uploading PDF to Azure Blob Storage via Groovy - Issues with pictures

I have the request to Upload a PDF from SFTP to Azure Blob which is working for text based PDF only.
If I have a PDF with pictures the PDF ulploaded is faulty (missing pictures)
If I use the "normal" bytearrayoutputsream and return a string I convert it back to PDF and it works.
The issue only occours using Azure methods:
I use this line of code to so:
def body = message.getBody(String.class)
BlobOutputStream blobOutputStream = blob.openOutputStream()
blobOutputStream.write(body.getBytes())
blobOutputStream.close()
A correct PDF with pictures is expected. How to do so ?
As suggested by Priyanka Chakraborti If using open connectors with Cloud Plateform intergation(CPI) is an option, then you can refer to the blogpost. The files will not be corrupted in that case.

Display image in Databricks notebook error

I am working on creating a databricks notebook template with company logo. Using the below code to display image is throwing error.
Code:
%md
<img src ='/test/image/MyImage.jpg'>
Error:
HTTP ERROR 403: Invalid or missing CSRF token
Please guide me.
You either need to store image somewhere, and refer to it as a full URL, for example, you can refer your company site.
Another way is to upload file to the /FileStore directory on DBFS, and then you can refer to it using the /files/ URL, that is supported in both HTML and Markdown (see docs):
%md
![my_test_image](files/image.jpg)
You can upload image using databricks-cli, or via UI (if you have DBFS File Browser enabled). (Another option is the DBFS REST API, but it's cumbersome)

Glide dont load image from document

i have external local database and i have to save image into database,
image come from camera and gallery and image drawable
glide load image from imagedrawble but cant load image from camera or gallery
and i save uri these images
glide can load this uri from image drawable
content://media/external/images/media/772718
but cant load this uri from camera or gallery
content://com.android.providers.media.documents/document/image%3A772711
i load image this way
Uri uri = Uri.parse(modelInsertInfo.getImage_src());
Log.d("LOG30",uri.toString());
Glide.with(this).load(uri).into(imgDetail);
You can try obtaining path from your uri object and pass it to Glide, check the code below :
Glide.with(this).load(uri.getPath()).into(imgDetail); // get path from Uri and pass it to glide.

Image Resizer not resizing locally

I am using ImageResizer with the AzureReader2 plugin on an ASP.NET MVC application.
When I type http://localhost:[port]/[prefix]/[blobname] on the address bar I get redirected to [endpoint]/[blobname], and I am able to see my image.
But I can't use any query string, for example typing http://localhost:[port]/[prefix]/[blobname]?width=200 gives me the IIS HTTP Error 404.0 - Not Found page. I've tried setting redirectToBlobIfUnmodified to both true and false, but I get the same result.
When I host the image locally, everything works fine.
I got it working by including the container name in the url:
http://localhost:[port]/[prefix]/[containername]/[blobname]?width=200
Using this method, it's the original image that gets broken. In those cases, I would just have to use the raw blob storage url.

Resources