Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tutorial_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def __getitem__(self, idx):
bbx_instance = torch.tensor(bbx_instance)
shadowfree_img = cv2.cvtColor(shadowfree_img, cv2.COLOR_BGR2RGB)
target = cv2.cvtColor(shadowfree_img, cv2.COLOR_BGR2RGB)
zt = target
source = np.concatenate((shadowfree_img, object_mask[:, :, np.newaxis]), axis=-1)
cls_input = np.concatenate((shadowfree_img, object_mask[:, :, np.newaxis]), axis=-1)
cls_input = cls_input.astype(np.float32) / 255.0
Expand All @@ -211,4 +212,4 @@ def __getitem__(self, idx):
mask_embeddings = torch.zeros((64, 2048), dtype=torch.float32)
bbx_region = torch.zeros((512, 512), dtype=torch.float32)

return dict(jpg=target, cls=cls_input, fg=bbx_instance, bbx=bbx_region, embeddings=mask_embeddings, img_name=pic_name, txt=prompt, hint=source)
return dict(zt=zt, jpg=target, cls=cls_input, fg=bbx_instance, bbx=bbx_region, embeddings=mask_embeddings, img_name=pic_name, txt=prompt, hint=source)