"src/vscode:/vscode.git/clone" did not exist on "bf35297e4a9aca1bb2139645907bdb96c5213ca2"
Commit c04f261a authored by dongchy920's avatar dongchy920
Browse files

InstruceBLIP

parents
Pipeline #1594 canceled with stages
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import json
with open('problems.json', 'r') as f:
data = json.load(f)
train, test, val = [], [], []
for key, value in data.items():
split = value["split"]
ques_type = value["ques_type"]
if ques_type == "choose_txt":
data = value
data['id'] = key
if split == "train" :
train.append(data)
elif split == "test":
test.append(data)
elif split == "val":
val.append(data)
with open('/input/iconqa/annotations/train.json', 'w') as train_file:
json.dump(train, train_file, ensure_ascii=False, indent=4)
with open('/input/iconqa/annotations/test.json', 'w') as test_file:
json.dump(test, test_file, ensure_ascii=False, indent=4)
with open('/input/iconqa/annotations/val.json', 'w') as val_file:
json.dump(val, val_file, ensure_ascii=False, indent=4)
\ No newline at end of file
This diff is collapsed.
import cv2
class CannyDetector:
def __call__(self, img, low_threshold, high_threshold):
return cv2.Canny(img, low_threshold, high_threshold)
#! /bin/bash
wget https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/dpt_hybrid-midas-501f0c75.pt
wget https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/network-bsds500.pth
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment