当前位置: 首页>>代码示例>>Python>>正文


Python Analysis.addScene方法代码示例

本文整理汇总了Python中Analysis.addScene方法的典型用法代码示例。如果您正苦于以下问题:Python Analysis.addScene方法的具体用法?Python Analysis.addScene怎么用?Python Analysis.addScene使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Analysis的用法示例。


在下文中一共展示了Analysis.addScene方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import addScene [as 别名]
 def __init__(self,Pathx, B):
     path = "/media/iglu/Data/DatasetIglu"
     i = 0
     Analysis.initial()
     files = open("Output_1_L.txt", 'w')
     start_time = timeit.default_timer()
     for x in os.listdir(path):
         # if i == 0:
         #     i += 1
         #     continue
         # else:
         if Pathx != x:
             continue
         for y in os.listdir(path + "/" + x) :
             if (y != "Objects.txt") and not y.endswith(".zip"):
                 # print path+"/"+x+"/"+y+"/k1"
                 f = open(path + "/" + x + "/" + y + "/k1" + "/List.txt", 'r')
                 f2 = open(path + "/" + x + "/" + y + "/speech.txt", 'r')
                 speak = f2.readline()
                 if speak == 'This...':
                     sp = 1
                 elif speak == 'That...':
                     sp = 2
                 else:
                     sp = 0
                 mn = 0
                 for line in f:
                     Time = line
                     file1 = next(f).rstrip('\n')
                     file2 = next(f).rstrip('\n')
                     Label = next(f).rstrip('\n')
                     # files.write(RGB.__str__())
                     # files.write(Depth.__str__())
                     # files.write(Label+" "+x+" "+file1+"\n")
                     if mn == 0:
                         RGB = cv2.imread(path + "/" + x + "/" + y + "/k1" + "/RGB/" + file1)
                         Depth = cv2.imread(path + "/" + x + "/" + y + "/k1" + "/Depth/" + file2)
                         Analysis.addDepth(Depth)
                         Analysis.addRGB(RGB)
                         Analysis.addSpeech(sp)
                         Analysis.addScene(Label)
                     else:
                         if mn == 2:
                             mn = -1
                     mn += 1
             # print "Enviado " + x + " " + y
         i += 1
     elapsed = timeit.default_timer() - start_time
     print "Tiempo: " + elapsed.__str__()
     print "Starting Training"
     start_time = timeit.default_timer()
     Analysis.CompleteAnalysis(B, False, True, 0.3, files)
     files.close()
     # Analysis.Mostrar()
     # code you want to evaluate
     elapsed = timeit.default_timer() - start_time
     print "Tiempo: " + elapsed.__str__()
开发者ID:pazagra,项目名称:catkin_ws,代码行数:59,代码来源:Learn.py

示例2: __init__

# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import addScene [as 别名]
    def __init__(self,B):
        path = "/media/iglu/Data/Dataset/DatasetIglu/Dataset_cleaned_v4"
        i = 0
        Analysis.initial()
        files = open("Output_1_L.txt", 'w')
        start_time = timeit.default_timer()
        for x in os.listdir(path):
            # if i == 0:
            #     i += 1
            #     continue
            # else:

            f = open(path+"/"+x+"/List.txt",'r')
            for line in f:
                Time = line
                file1 = next(f).rstrip('\n')
                file2 = next(f).rstrip('\n')
                Label = next(f).rstrip('\n')
                RGB = cv2.imread(path+"/"+x+"/RGB/"+file1)
                Depth = cv2.imread(path+"/"+x+"/Depth/"+file2)
                # files.write(RGB.__str__())
                # files.write(Depth.__str__())
                # files.write(Label+" "+x+" "+file1+"\n")
                Analysis.addDepth(Depth)
                Analysis.addRGB(RGB)
                Analysis.addScene(Label)
                i += 1
            print "Enviado "+x
            # if i > 150:
            #     break
        elapsed = timeit.default_timer() - start_time
        print "Tiempo: "+elapsed.__str__()
        print "Starting Training"
        start_time = timeit.default_timer()
        Analysis.CompleteAnalysis(B,True,0.3,files)
        files.close()
        #Analysis.Mostrar()
        # code you want to evaluate
        elapsed = timeit.default_timer() - start_time
        print "Tiempo: "+elapsed.__str__()
开发者ID:pazagra,项目名称:catkin_ws,代码行数:42,代码来源:Learnv1.py


注:本文中的Analysis.addScene方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。