How to sync name on wandb web with images saved on the disk

I use pytotch-lightning and wandb. After using wandblogger, the image with a name like ‘bird 1’ on the web shows correct. But the image saved on disk with a name like ‘test_image_21_0’, which is quite different from my name ‘bird 1’. This also happens in other frameworks.
What should I do to keep the name of images shown on the web the same as the image names saved on the disk?

Hi LAngelo,

I’m happy to help you with this. At this time we maintain unique image file names for runs on disk (Projects → → Runs → → Files) vs what is displayed in the media panels on the wandb web interface. Could you please help me understand your use case as to why you want the image name displayed and image file name to match?

Regards,

Mohammad

My jobs is related to super resolution. Sometimes web is not efficient to display big image. When I wanted to go back to the original image , I got big trouble. As you know, I can download some images, but I can’t download them one by one. So I really need the image name displayed matches to image file name. I wonder where is the file recording the match information between them.

Hi LAngelo,

I understand why working with large sized files could be frustrating when attempting to load them in the workspace, we are aware of slow load times on some large file sizes. Can you please provide me a link to your workspace, I’d like to get a better understanding of what you are experiencing/viewing.

Hi LAngelo,

I am following up on your ticket from last week regarding our media panel file naming conventions. Please let me know if you require further assistance.

Regards,

Mohammad

Thank you for your kindness. Unfortunately I can’t provide my workspace. But I can tell you the problem in greater detail.
Take this image as an example:

I need to generate texture on this clothes.

Without matching names, my workflow is: select next step. Zoom image. Close Image. Select next step. Zoom image. Close Image.Until find the step I need. Write down the step information.

With matching names, my workflow will be: open image. Zoom image. Press left arrow . Press left arrow . Until find the step I need. But the name has no information related to step.

Obviously the second solution is more convenient. In reality, I only need to press one key rather than switch from window to window.

I wonder if you have a better idea to improve my workflow. Or if I can find a file in wandb to transform the label on desk to a easy-to-read label.

Hi LAngelo,

I appreciate the follow-up with your use case. I do have two pointers that could assist with you with your workflow. If you are using wandb.data_types.Image (see here) to format the images when logging them to W&B, setting the data_or_path  to your image on disk will log the image with the name on disk, example, "../images/test_run/TexturedShirt.png" will get logged with W&B as TexturedShirt.png. One other tip that could assist is adding a caption to your image using the caption variable.

If you are using integrations such as Keras, the process will continue to be automated and there isn’t a method now to change the logged image names, yet we are working on adding more functionality to our logged media.

Hope this helps, please let me know if you have additional questions.

Regards,

Mohammad

I have already used the caption variable. The name in the chart-media-image has already changed. I find the image name saved in files-media-images is different from the name shown in chart-media-image. So I think there should be a file record the relationship between them . Where it is? Or the image shown on the board is not based on the image save in files-media-images.

Hi @langelo ,

To attempt to reproduce your work I would need to see the see the code you used to log the images. From the second image presented above, the media panel represents an image logged with wandb.log({"val_image": [wandb.Image(<image path>, caption="val_BGMG....")]. The text appearing on the medial panel is user set. For example if log the same image twice:

# Log the image
im = plt.imread(path_to_img)
wandb.log({"Cafe_Image_1": [wandb.Image(im, caption="Cafe1")],
          "Cafe_Image_2": [wandb.Image(im, caption="Cafe2")]})
wandb.finish()

The logged media is “Cafe_Image_1” and “Cafe_Image_2” with the assigned captions. The files appear in the projects files/media/images as

“Cafe_Image_1 …" and "Cafe_Image_2…” with a series of random value (that cannot be modified) appended to the file name.

Hi @langelo

I wanted to follow up with you regarding this request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,

Mohammad

Hi @langelo,

Since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

Regards,

Mohammad

Do you mean I should write image name in keys position? Here is my code:

for i in range(5):
  wandb.log({'pred':[wandb.Image(img,caption=f'cafe{i}'),wandb.Image(img,caption='cafe2')]})
  wandb.log({'eval':[wandb.Image(img,caption=f'cafe{i}')]})

This runs well. But creates random names in media file.


for i in range(5):
  wandb.log({f'pred{i}':[wandb.Image(img,caption=f'cafe{i}'),wandb.Image(img,caption='cafe2')]})
  wandb.log({'eval':[wandb.Image(img,caption=f'cafe{i}')]})

This displays incorrectly.(The fist slider is lost.) But names in order.


image

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.