Commit
·
bfc99c6
1
Parent(s):
2880d52
Update describe.py
Browse files- describe.py +5 -5
describe.py
CHANGED
@@ -10,7 +10,7 @@ from PIL import Image
|
|
10 |
from tqdm import tqdm
|
11 |
import torchvision.transforms as transforms
|
12 |
|
13 |
-
from
|
14 |
|
15 |
model = None
|
16 |
first_run = True
|
@@ -224,11 +224,11 @@ def process_image(image, folder_location):
|
|
224 |
parser.add_argument('--check', action='store_true', help='whether to validate box feat by regenerate sentences')
|
225 |
args = argparse.Namespace()
|
226 |
|
227 |
-
args.config_json = f'{folder_location}
|
228 |
-
args.lut_path = f'{folder_location}
|
229 |
-
args.model_checkpoint = f'{folder_location}
|
230 |
args.img_path = image
|
231 |
-
args.result_dir = f'{folder_location}
|
232 |
args.box_per_img = 100
|
233 |
args.batch_size = 2
|
234 |
args.extract = False
|
|
|
10 |
from tqdm import tqdm
|
11 |
import torchvision.transforms as transforms
|
12 |
|
13 |
+
from model.densecap import densecap_resnet50_fpn
|
14 |
|
15 |
model = None
|
16 |
first_run = True
|
|
|
224 |
parser.add_argument('--check', action='store_true', help='whether to validate box feat by regenerate sentences')
|
225 |
args = argparse.Namespace()
|
226 |
|
227 |
+
args.config_json = f'{folder_location}/model_params/train_all_val_all_bz_2_epoch_10_inject_init/config.json'
|
228 |
+
args.lut_path = f'{folder_location}/data/VG-regions-dicts-lite.pkl'
|
229 |
+
args.model_checkpoint = f'{folder_location}model_params/train_all_val_all_bz_2_epoch_10_inject_init.pth.tar'
|
230 |
args.img_path = image
|
231 |
+
args.result_dir = f'{folder_location}'
|
232 |
args.box_per_img = 100
|
233 |
args.batch_size = 2
|
234 |
args.extract = False
|