Clarifai GUI. How to view the predictions for a specific file id - clarifai

I cannot find a way to find a specific file in a custom model via the online GUI. I have uploaded the file via the api along with several hundred images used for training. How can I filter the files displayed using the image id only. From there can I view the results of the prediction. I tried drag and drop and got a selected image displayed with a selected tick mark.
Anybody any idea where I go from here?
Or is there another way?

Related

Conveniently randomize image via button from folder/slide?

I often spend hours bringing pictures into PowerPoint templates one by one and trying to customize the way a presentation whose behavior is very different.
If there were a way to randomly select an image from all of the images on a different slide or excel file or folder and have them appear based on the probable weight assigned to them, it would be a huge time saver.
I've seen various methods of having a random object appear, and some of them don't even require a macro, but importing the images is always very time consuming. If anyone knows of a better/faster way to link a folder with a group of images or something along these lines to an object that is randomized, please help.
Importantly, showing a random image from a batch group without customizing the way each image is brought in is the hard part. Adding weight helps, but it could be done by duplicating important images repeatedly.

Stitching thousands of .png files with Fiji

I wrote a Node.js app that creates images that I want to stitch. I want to create one image with over 10,000 charts. My original solution was to create images each with over 200 charts each and stitch those together. That results in 50 images being stitched.
I now wish to create one chart per image, resulting in over 10,000 images, and stitch those together. When I drag and drop the files into Fiji to create a montage, it opens each individual one. It takes way to long to open the entire collection.
Is there a way I can create a montage of thousands of images and stitch everything into a single file in Fiji that doesn't require every image being opened?
You say that you want to stitch your image, which implies your goal is to find where these images overlay from a specific channel, but when you say montage, it makes it seem like what you really want to do is concatenate the images into a stack or align them into a montage. To me it appears that you have a program which will output some form of stack which has 200 planes, and then concatenate them together or align them as a montage.
In principle, you will have to open every image, but opening them with batch mode on and running the operations by macro will reduce time by not rendering the viewable image. It would not be possible to run ImageJ/FIJI operations on an image without opening it, as this is beyond something like renaming or deleting a file.
If you really meant that you want to stitch them, use the stitching plugin function for Grid/Collection stitching, and set the overlap to zero. This requires having your images be in a single folder, and in your case splitting them into individual images instead of sets of 200, with each file labeled with an increasing number (i.e. file_name_1.tif, file_name_2.tif, where each file_name is the same and only the number changes). If you have stacks of 200 and are happy to keep them that way in the created montage, the file naming convention needs to be the same. You should select the Fuse and Display option to get the resulting image. The output will be a merged, larger image.
When you are trying to somehow stitch the images and overlay the stacks, scripting the commands to run it in batch mode would also work.
For stitching I highly recommend the MIST plugin. For batch opening files, try dragging and dropping the folder containing the images rather than the images themselves. Alternatively, go through File -> Import -> Image Sequence.

How to batch add logos to different images

i have almost 5k different logos and also have 5k different images, i want to add them up, is there any tool or way to do this.
I have seen tool which add one logo to all images, but it don't work with my scenario, i need a tool or way which allow me to multiple logos to add on multiple files, for example
image 1 + logo1.jpg= image and logo1.jpg
image 2 + logo2.jpg= image and logo2.jpg
and soo one.
is there way to do this work quickly instead of editing every pic manually
You could achieve this by creating actions and then using batch actions on folders containing the files. If you sort all the images you want to have logo1 into their own folder, you can use a batch action to add the logo to every image in the folder and then save the new image as a jpg in a different folder.
Here is a short youtube video explaining batch actions, and here is a much longer, more detailed video that's officially from Adobe. If you don't like videos, this page explains the process with graphics.
In short, here's what I would do:
Sort all the images you want to have logo 1 into a folder.
Open logo 1.
Select all and copy the logo.
With your logo still on the clipboard, open the first image.
Go to Windows --> Actions
Hit the little paper peeling icon to create a new action
Hit the record button to record your action and name it something you can remember later.
Paste your logo, and place it where you want it.
Go to Layers -> Flatten Image
Stop recording (or you might record how you save, but this doesn't always work. If you do save, don't save over your original, rename it!)
Go to File -> Automate -> Batch, and choose the action you just saved, and select the folder you want to save the new logo-ified images into.
Carefully set all the save options
Click Run!
If you get prompted to choose color options on every save, you might want to redo the action so it includes (or does not include) "save as" options.
This is the short version of the answer. I'm sure there are ways to script it, too, but this may be easier if you're not familiar with scripting.

Photoshop Actions - Is this possible?

Okay, here's what's going on..
I have a folder that has 200 images in it.
They're all named - p001.png, p002.png, p003.png... all the way up to p200.png
I need to create an Action that pulls in 2 images at a time, in ascending order.
After Resizing & Positioning the images, I need to add text above each image that says "Image #X"
(in place of 'X', would be the number of the corresponding image)
Once it finishes with the 1st two images, it saves it in a specified folder; and pulls in the next 2 images.
And just repeats the process until it goes through all 200 images.
Here's my 2 questions:
1 - Is it possible to pull in 2 images at a time in ascending order, from a specified folder, via an Action?
2 - Is it possible to replace 'X' with the image's number, as it moves up in ascending order?
Any kind of help with this would be Greatly appreciated.
Thanks in advance!
p.s. I'm using PhotoShop cs5.5 if that makes a difference
First checkout the Contact Sheet functionality, perhaps you can achieve your tasks this way.
In terms of scripting, there are indeed functions available to :
load a file into the document
create a text layer
set the text of the text layer
Check out the Photoshop CS5 JavaScript Language Reference for more details.
Additionally, you should have Extend Script Toolkit installed as well.
Run Extend Script Toolkit then give this a quick go:
#target photoshop
alert("Hello World!");
Using the Object Model Viewer (available under the Help menu) you should be able to select the Photoshop Type Library and view useful available objects such as Application,Document,Layer, etc. and see their properties and methods.
Additionally the Data Browser panel and autocomplete should help.

How to get the path coordinates of a shape for use with image-maps?

I am creating an image map using ImageMapster from here.
I have created a photoshop image with several images that I have cut out from the original photographs. Each image is on a separate layer.
Now, I need to get the path coordinates of each object, and I don't want to hover over every corner and manually write down each coordinate.
Is there an automated way to get this path?
Maybe there is some application or web service whence I can send my image and get the path in return?
I have tried exporting each layer separately and then importing them into illustrator and vectorizing the shape (it keeps the shape in its original position), but I can't figure out how to get the coordinate path as text. I can export it to svg, but that isn't the same simple code needed for the css image map.
Ah! After googling image-map, much thanks to Sven for the idea (he got my +1), I found this thread here on Stack Overflow.
So here is my process.
Prepare the image in Photoshop with each object on a separate layer with a transparent background (this will make it easy for you when you do the tracing).
Save your photoshop file.
Open the Photoshop file in Illustrator using File...Open (works in CS4 and CS5) and make sure to allow the option to import Photoshop's layers as separate objects. After you open the file, make sure NOT to move any of the objects around - you need them to be in the exact same place as they were in the photoshop file so they can superimpose each other when rendered to the imagemap.
Use the Live Trace with custom settings. Use the black & white mode with the threshold all the up (255). This will produce a black silhouette of the shape. (You can also use "ignore white"). Push the Trace button. If you have many layers, you can save this new tracing pattern as a preset - I called mine, Silhouette. Now, I just click on a layer and choose Silhouette from the tracing buttons' dropdown menu.
Expand the shape and make sure it consists of only a single flat shape:
you can use the blob brush in illustrator to blacken over any unwanted white areas
no groups
no compound shapes (or it won't work) - which means you can't create cutouts.
You can tell the shapes are right when you click on them - you should be able to see the path itself with no "other" shapes involved (perhaps the blob brush additions) - just a single path. An easy method is this:
select the shape
ungroup if necessary
release compound path
unite (shape mode merges all shapes into one)
Don't crop your image - you want your shape to be in the same place in the image's area as in your original photoshop image.
Don't join all the shapes together, either.
The shapes should all be individual whole shapes, all in their original locations, each on a separate layer.
Now, open Illustrator's Attributes panel, and make sure to "show options".
Select your shape and in the "Attributes" panel, switch the "Image Map" combo box from None to Polygon. Make sure to add a url (it doesn't matter what you put; you can change it later - I just put "#" and the name of the shape so I can tell which one it belongs to in the image map code)
Do this for each of the objects.
Now, in the File menu, go to "Save for Web and Devices". Skip all the settings here and just push "Save".
In the "Save As" (the title of the window is "Save Optimized As") dialogue box, use "Save As type:" and select HTML Only(*.html) if you just want the code, or HTML and Images if you want the sillouhuette, too (they will appear in a folder called "images") - and note your save location.
Now go open that html file in notepad!
Voila! All the shapes will be rendered for you as a pre-made image-map - points path and even html code. Here is what it looks like when you open in notepad the html file you just created: For this demo, I chose a particularly complicated image - one which you would never want to estimate by hand, nor have to do twice!
Don't forget to place the actual image file somewhere in your site's images folder. You can save the psd file for later and add more "stuff" if you want, and repeat the process.
I was able to create the image map this way for my photoshop picture in just a brief couple of minutes. After you do it once, it gets easier for next time.
This has been bugging me for so long and I don't have Illustrator to be able to use the solution proposed by BGM, that I created my own Photoshop addon.
You can get it here: https://creative.adobe.com/addons/products/2389
It writes all your paths' points' coordinates to a text file.
Should work for CS6 and above.
The way I use it is I create a marquee, right click -> make work path, rename my path, [repeat], then just export coords via my addon.
If anyone's interested in the scripts behind it, you can have a look here: http://pastebin.com/8ugcAV3j
In case you make any improvements, please post them here so that other people may use them as well.
Hope this helps someone.
EDIT: added link to source script (was only in comments before)
I used this to find the co-ordinates of the outline of a shape to make image hotspots for links in dreamweaver. If you have something else in mind, then you'll have to ignore some of it. This works on a single layer so you may want to make a "flattened copy first", but I don't see why it wouldn't work on a multi layered image.
Use wand to highlight area you want. This will be different for different images.
Right click and hit Make Work Path. Use a suitable tollerance which is found by trial and error. I just use the most sensitive.
Do this for all areas in all of your images creating separate paths for each.
Click edit then export paths to illustrator and save file in sensible place.
Open the saved file in word. Ignore the bumf the the top and use replace to remove ALL LETTERS. Don’t worry about the paragraph characters.
Note that all of the work paths are exported in the same file separated by a blank line so must copied and pasted separately to be used for each hotspot.
After inserting your image. Start making a map in dreamweaver with a couple of co-ordinates then simply replace these in the with information from the illustrator file for each of the map areas to be produced.
I add my updated answer I had to find since adobe has eliminated HTML output in many instances, I work mostly with photoshop (CS4) and this is a perfect solution:
1) download following file: https://github.com/andyhawkes/ps-paths-to-imagemap
2) open your image in photoshop and select the form with the magic wand
3) right click and select 'make work path' (the lesser the px, to more accurate)
4) go to File -> Scripts -> Browse ... and select the script from the first step
that's it !! this script will open your texteditor with the coordinates ...
Something like this may be useful;
http://code.google.com/p/imagemap/
Copy your image into position, then plot.
creating an image map is really simple.
First we need to look at the syntax of the code
Let's create a div.If we want to position it at the right side of our page,we can just begin by writing
<div align="right">
After that, we import the image that we are gonna map.
<img src="" alt="" width="" height="" usemap="#nameofmap" />
Now we have to define the map structure.First lets assume that you want a rectangular portion of an image to act like a hyperlink.
<map name="nameofmap">
<area href="wherever I wanna take that.com" alt="" title=""
shape=rect coords="A,B,C,D"></map>
Now we close the div.
</div>
If the shape is circular,we use the syntax
shape=circle coords="x,y,radius"
If shape is polygonal, we use
**shape=poly coords="a,b,c,d,e,f,gh"
Now comes the big part:How to find the image map coords.
Very simple.Go to
http://www.image-maps.com
Browse your image file,click "Start Mapping your image",then you proceed, and then on the next page,click "Import Old mapping Code" on the right.then you get the coords.
After that, you can use FIREBUG to change the coords according to your specifications,because image-maps only hyperlinks the whole image,so use firebug to change the coords and adjust according to your requirements.
Have fun.