-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
detr as submodule detr as submodule detr as submodule
- Loading branch information
1 parent
f029e1d
commit 321ff8e
Showing
16 changed files
with
33 additions
and
1,512 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "examples/post_training_quantization/coco2017/DETR/detr"] | ||
path = examples/post_training_quantization/coco2017/DETR/detr | ||
url = https://github.com/facebookresearch/detr.git |
20 changes: 20 additions & 0 deletions
20
examples/post_training_quantization/coco2017/DETR/datasets.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from pathlib import Path | ||
from detr.datasets.coco import CocoDetection, make_coco_transforms | ||
|
||
def build(image_set, args): | ||
root = Path(args.coco_path) | ||
assert root.exists(), f'provided COCO path {root} does not exist' | ||
mode = 'instances' | ||
PATHS = { | ||
"train": (root / "train2017", root / "annotations" / f'{mode}_train2017.json'), | ||
"val": (root / "val2017", root / "annotations" / f'{mode}_val2017.json'), | ||
} | ||
|
||
img_folder, ann_file = PATHS[image_set] | ||
dataset = CocoDetection(img_folder, ann_file, transforms=make_coco_transforms("val"), return_masks=args.masks) | ||
return dataset | ||
|
||
def build_dataset(image_set, args): | ||
if args.dataset_file == 'coco': | ||
return build(image_set, args) | ||
raise ValueError(f'dataset {args.dataset_file} not supported') |
25 changes: 0 additions & 25 deletions
25
examples/post_training_quantization/coco2017/DETR/datasets/__init__.py
This file was deleted.
Oops, something went wrong.
158 changes: 0 additions & 158 deletions
158
examples/post_training_quantization/coco2017/DETR/datasets/coco.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.