Upload infer.py with huggingface_hub
Browse files
infer.py
CHANGED
@@ -5,7 +5,7 @@ from copy import deepcopy
|
|
5 |
|
6 |
from typing import List, Optional, Union
|
7 |
from torch import autocast
|
8 |
-
from torchvision import utils as vutils
|
9 |
from utils.util import EditingJsonDataset, EditingSingleImageDataset, plot_images
|
10 |
from lr_schedule import WarmupLinearLRSchedule
|
11 |
from torch.optim.lr_scheduler import CosineAnnealingLR
|
@@ -13,7 +13,7 @@ from torch.utils.tensorboard import SummaryWriter
|
|
13 |
from models.model import RGN
|
14 |
from models.utils import visualize_images, read_image_from_url, draw_image_with_bbox_new, Bbox
|
15 |
from utils.util2 import compose_text_with_templates, get_augmentations_template
|
16 |
-
from torchvision.utils import draw_bounding_boxes
|
17 |
from timm.data.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
|
18 |
from torchvision import datasets, transforms
|
19 |
from engine import *
|
@@ -37,7 +37,7 @@ from copy import deepcopy
|
|
37 |
|
38 |
from typing import List, Optional, Union
|
39 |
from torch import autocast
|
40 |
-
from torchvision import utils as vutils
|
41 |
from utils.util import build_dataset, plot_images
|
42 |
from lr_schedule import WarmupLinearLRSchedule
|
43 |
from torch.utils.tensorboard import SummaryWriter
|
|
|
5 |
|
6 |
from typing import List, Optional, Union
|
7 |
from torch import autocast
|
8 |
+
#from torchvision import utils as vutils
|
9 |
from utils.util import EditingJsonDataset, EditingSingleImageDataset, plot_images
|
10 |
from lr_schedule import WarmupLinearLRSchedule
|
11 |
from torch.optim.lr_scheduler import CosineAnnealingLR
|
|
|
13 |
from models.model import RGN
|
14 |
from models.utils import visualize_images, read_image_from_url, draw_image_with_bbox_new, Bbox
|
15 |
from utils.util2 import compose_text_with_templates, get_augmentations_template
|
16 |
+
#from torchvision.utils import draw_bounding_boxes
|
17 |
from timm.data.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
|
18 |
from torchvision import datasets, transforms
|
19 |
from engine import *
|
|
|
37 |
|
38 |
from typing import List, Optional, Union
|
39 |
from torch import autocast
|
40 |
+
#from torchvision import utils as vutils
|
41 |
from utils.util import build_dataset, plot_images
|
42 |
from lr_schedule import WarmupLinearLRSchedule
|
43 |
from torch.utils.tensorboard import SummaryWriter
|