Skip to content

Commit

Permalink
FEAT:LineMod处理完成
Browse files Browse the repository at this point in the history
  • Loading branch information
F-jie committed Jan 26, 2022
1 parent 483029d commit 0a34c61
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/ARIAnnotation.py → ARI/ARIAnnotation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cv2
from utils.TAUUtils import draw2DBBOX, draw3DBBOX
from TAU.TAUUtils import draw2DBBOX, draw3DBBOX

class ARIAnnotation2D(object):

Expand Down
2 changes: 1 addition & 1 deletion lib/ARICOCO.py → ARI/ARICOCO.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from lib.ARIAnnotation import ARIDataset
from ARI.ARIAnnotation import ARIDataset


class ARICOCO(object):
Expand Down
8 changes: 3 additions & 5 deletions lib/Linemod.py → ARI/Linemod.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import os

from django.forms import models
from ARI.ARIAnnotation import ARIAnnotation2D, ARIDataset, ARIImage
from TAU.TAUUtils import *

from lib.ARIAnnotation import ARIAnnotation2D, ARIDataset, ARIImage
from utils.TAUUtils import *

class ARILinemod(ARIDataset):
class Linemod(ARIDataset):
intrinsic = np.array([[572.4114, 0., 325.2611],
[0., 573.57043, 242.04899],
[0., 0., 1.]])
Expand Down
1 change: 1 addition & 0 deletions ARI/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .Linemod import Linemod
2 changes: 1 addition & 1 deletion utils/TAUUtils.py → TAU/TAUUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def calculateKeyPoint2D(points3D, intrinsic, RT):
tmp = np.matmul(np.matmul(intrinsic, RT_np), points3D_np)
tmp[0, :] = tmp[0, :] / tmp[2, :]
tmp[1, :] = tmp[1, :] / tmp[2, :]
res = tmp[:2, :].flatten()
res = tmp[:2, :].T.flatten()
return list(res)

## draw bbox
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .utils import TAUUtils
from .TAU import TAUUtils
1 change: 0 additions & 1 deletion lib/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from cv2 import line
from lib.Linemod import ARILinemod
from ARI.Linemod import Linemod

if __name__ == "__main__":
sourceDir = "E:\code\PoseFuse\data\Linemod_preprocessed"
linemod = ARILinemod(sourceDir, "linemod")
linemod = Linemod(sourceDir, "linemod")
linemod.images[1].visBBOX3D()

0 comments on commit 0a34c61

Please sign in to comment.