-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
F-jie
committed
Feb 23, 2022
1 parent
fa98e68
commit 4940b5c
Showing
5 changed files
with
122 additions
and
46 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
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
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
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
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 |
---|---|---|
@@ -1,11 +1,24 @@ | ||
import os | ||
from Linemod import Linemod | ||
from ARI.ARICOCO import ARICOCO | ||
import argparse | ||
|
||
if __name__ == "__main__": | ||
sourceDir = "E:\code\PoseFuse\data\Linemod_preprocessed" | ||
linemod = Linemod(sourceDir, "linemod") | ||
coco = ARICOCO(linemod) | ||
parser = argparse.ArgumentParser("Try use Transforrmer estimate 6DoF Pose", add_help=False) | ||
parser.add_argument("--use", type=str, default="Linemod2COCO", help="Values: Linemod2COCO, ...") | ||
args = parser.parse_args() | ||
|
||
coco.visbbox(os.path.join(sourceDir, "data\\02\\rgb"), [190,8990,910,3763]) | ||
coco.saveCOCO(os.path.join(sourceDir, "coco\instances_train2017.json")) | ||
if args.use == "Linemod2COCO": | ||
linemod_root = "/home/hnu/data/Linemod_preprocessed" | ||
linemod_cls_2_dir = os.path.join(linemod_root, "data/02/rgb") | ||
linemod = Linemod(linemod_root, "linemod-2") | ||
coco = ARICOCO(linemod) | ||
coco.visbbox(linemod_cls_2_dir, [190,8990,910,3763]) | ||
|
||
for i, image in enumerate(linemod.images): | ||
image.visBBOX3D() | ||
if i == 1: | ||
break; | ||
coco.saveCOCO("/home/hnu/Documents/data/") | ||
else: | ||
raise ValueError(f"arg {args.use} is not support!") |