I developed an Image Classification Model in CustomVision.AI
I want to download all of the training images used to train the model
I used the training API and was able to retrieve the "HTML" location of all the images however I'd like to use a script to actually download the image to a local drive from the HTML location but am not great with writing scripts as much as running them.
I was also trying to figure out if the images are stored in an azure resource or are custom vision uses its own load storage the images, I'd like to move the images over to an azure blob.
I'm not really a "Programmer" really more of a high-level technology manager but I am comfortable in running scripts and some python code.
I was also trying to figure out if the images are stored in an azure
resource
I suppose it's , cause the images are stored in blob after I checked the image uri. You could use browser developer tool(F12) directly to check the picture uri. The uri format is blob url with image id.
If you want to get all images uri you could use this api: GetTaggedImages and GetUntaggedImages, it will return all images information including the uri.
Related
storage_client = storage.Client.from_service_account_json('service-account-file.json')
bucket = storage_client.get_bucket(my_bucket)
blob = bucket.blob(my_blob)
blob.upload_from_string(img)
It depends from where you are uploading the image or in better explanation from where you store the image... if you wan to get the image from specific link from the web you can scrape using python module selinium or scrapy depends from where you do ... if you want upload using code you might more read the documentation and use the api key to upload ..
I see your code you may need to use scrapy instead of javascript ...
I am trying to build a REST API in which a user can send an image and another variable as parameters and in return the image function returns the image as response.
Right now I have built a file upload and I processes the uploaded file and it is saved to a location that is given as download link. But I want to make it accessible for other programmers so they can also use the feature and include it in their programs
http://Imageprocessr.com/ProcessImage/img="imagefile**"&¶="val"
So how to send an image as a parameter and return the image using response just like how we can return other data like texts etc.
Has someone a working example how to serve images dynamically without Blobstore ? Blobstore is deprecated and I would like to use the Images API in order to crop, resize and serve images which are stored in a google cloud bucket.
At the moment I am using cloud-storage in order to serve images but it was not possible to include the Images API. An example url looks like: https://storage.googleapis.com/orbital-views.appspot.com/blabla2.png?Signature=OHLKMc64WzThGSOU3Rv8MMWz919Pjl%2FYs9Nhw4abqVTX04h4aYniC%2B%2FCtMIeh2stA70KJFdKY1YNuwhBWxDQ4CaiXy0Onn3Fy7tkW1kXw0P5EhDhKQQ27ufgUmOkYxOULo65YkfdW7fVoVeruwdTahk3I94ac4Et3Bvs4nXHW4PQqk31dLVKwYLlTkAvUArg3oiaWsAwAZUKWjfYfw9z8i68QrZubDIB8zski%2FAukPgbT5c%2B8eq8BBPbdkcS1YiL9Wz6Yl1y8VCJxM%2BVMg81IIwCfF9qoJk8Cus20PBXrDYyO7sLvLx5Dy%2BfdMxqmi%2BIZZ2JAhfdjM3oZul5cj%2B9%2Bg%3D%3D&GoogleAccessId=orbital-views%40appspot.gserviceaccount.com&Expires=1504477278
This url is generated using a signed url approach. https://cloud.google.com/storage/docs/access-control/create-signed-urls-program
My aim is to serve an image with the Images API Python.
I tried the following methods but without success.
url = images.get_serving_url(None,filename=’/gs/xxx.appspot.com/’)
blobstore_filename = '/gs{}'.format(filename)
blob_key = blobstore.create_gs_key(blobstore_filename)
url2 = images.get_serving_url(blob_key)
I have a list of external URLs (.jpg or .png images) and want to send those as requests to the Google Cloud Vision API for label detection. I want the image with the highest confidence for a particular label(s) returned first. Basically I would like to sort images in descending order of confidence for a label (such as car).
So far I've figured out how to annotate images stored locally but am trying to figure out how I can feed it a list of external image URLs and sort them by confidence for 'car'.
You can send a request with several image, if you save it in Google Cloud Storage for example. But you have to be aware on total size of 8Mb per request.
Then you can save the metadata locally and order it as you want. Google Vision API doesn't give to you the functionality that you want natively.
Reference:
https://cloud.google.com/vision/docs/best-practices
The newest version of the Python Google Vision SDK allows you to send external URLs, per their documentation: https://cloud.google.com/vision/docs/detecting-labels#detecting_labels_in_a_remote_image.
I am writing a webcrawler that finds and saves the urls of all the images on a website. I can get these without problem. I need to upload these urls, along with a thumbnail version of them, to a server via http request, which will render the image and collect feature information to use in various AI applications.
For some urls this works no problem.
http://images.asos-media.com/products/asos-waxed-parka-raincoat-with-zip-detail/7260214-1-khaki
resizes into
http://images.asos-media.com/products/asos-waxed-parka-raincoat-with-zip-detail/7260214-1-khaki?wid=200
but for actual .jpg images this method doesn't work, like for this one:
https://cdn-images.farfetch-contents.com/11/85/29/57/11852957_8811276_480.jpg
How can I resize the jpgs via url?
Resizing the image via the URL only works if the site you're hitting is using a dynamic media service or tool in their stack. That's why ASOS will allow you to append a query with the dimensions for resize, however different DM tools will have different query parameters.
If you want to make it tolerant you're best off downloading the image, resizing it with Python and then uploading it.