导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. 么西
    3. 楼层
    么
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 帖子
    • 楼层
    • 最佳
    • 群组

    么西 发布的帖子

    • MemoryError:Out of normal MicroPython Heap Memory!

      0_1546910281324_3e5eac07-c939-42b6-82b7-f032cb555f7b-image.png

      
      import time, sensor, image
      from image import SEARCH_EX, SEARCH_DS
      
      sensor.reset()
      sensor.set_contrast(1)
      sensor.set_gainceiling(16)
      sensor.set_framesize(sensor.QQVGA)
      sensor.set_pixformat(sensor.GRAYSCALE)
      
      
      templates = ["/ren.pgm", "/zhi.pgm", "/chu.pgm"]
      
      clock = time.clock()
      
      while (True):
          clock.tick()
          img = sensor.snapshot()
      
          for tem in templates:
              template = image.Image(tem)
              r = img.find_template(template, 0.70, step=4, search=SEARCH_EX)
              if r:
                  img.draw_rectangle(r)
                  print(tem)
      
          print(clock.fps())
      
      

      求助大佬 谢谢

      发布在 OpenMV Cam
      么
      么西
    • RE: 有是这个问题MemoryError

      @yuan 0_1534313434890_d0615b6c-7464-4c84-aa94-bdd5f1d86db4-image.png

      发布在 OpenMV Cam
      么
      么西
    • RE: 有是这个问题MemoryError

      @yuan 0_1534311902627_d32ae5ef-95e6-47c5-a101-c53917979a6f-image.png

      发布在 OpenMV Cam
      么
      么西
    • RE: 有是这个问题MemoryError

      @yuan 所有都是,随便来个第一个

      # cifar10例程
      import sensor, image, time, os, nn
      
      sensor.reset()                         # Reset and initialize the sensor.
      sensor.set_contrast(3)
      sensor.set_pixformat(sensor.RGB565)    # Set pixel format to RGB565
      sensor.set_framesize(sensor.QVGA)      # Set frame size to QVGA (320x240)
      sensor.set_windowing((128, 128))       # Set 128x128 window.
      sensor.skip_frames(time=1000)
      sensor.set_auto_gain(False)
      sensor.set_auto_exposure(False)
      
      # 加载cifar10网络。OpenMV3 M7上使用此网络可能会超出内存。
      #net = nn.load('/cifar10.network')
      
      # 更快,更小,更准确。建议OpenMV3 M7上使用此网络。
      net = nn.load('/cifar10_fast.network')
      labels = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
      
      clock = time.clock()                # Create a clock object to track the FPS.
      while(True):
          clock.tick()                    # Update the FPS clock.
          img = sensor.snapshot()         # Take a picture and return the image.
          out = net.forward(img)
          max_idx = out.index(max(out))
          score = int(out[max_idx]*100)
          if (score < 70):
              score_str = "??:??%"
          else:
              score_str = "%s:%d%% "%(labels[max_idx], score)
          img.draw_string(0, 0, score_str, color=(255, 0, 0))
      
          print(clock.fps())             # Note: OpenMV Cam runs about half as fast when connected
                                         # to the IDE. The FPS should increase once disconnected.
      
      ```上次你就没解决 大佬
      发布在 OpenMV Cam
      么
      么西
    • 有是这个问题MemoryError

      所有关于机器学习的案例都报这个错误
      MemoryError:Out of normal MicroPython Heap Memory!Please reduce the resolution of the image you are running this algorithm on to bypass this issue!
      我买的是假的吧

      发布在 OpenMV Cam
      么
      么西
    • 怎样自己提取特征值 自己比对?

      不知道怎么自己提取特征值,然后再怎么比对

      发布在 OpenMV Cam
      么
      么西
    • RE: 新手请问一下如何查看find_displacement函数的源码

      @半瓶水 哪里 没看见源码

      发布在 OpenMV Cam
      么
      么西
    • RE: memory error大佬帮忙看看 谢谢

      @yuan 万能的yuan 还是不行 我不可能刷会2.9.0版本吧 哎 好气啊

      发布在 OpenMV Cam
      么
      么西
    • RE: memory error大佬帮忙看看 谢谢

      @yuan 额 刚开始使用find_number进行数字识别遇到了困难 你们说openmv3 不支持了 建议我用lenet.network......

      发布在 OpenMV Cam
      么
      么西
    • RE: memory error大佬帮忙看看 谢谢

      @yuan 就是说我先改了分辨率 然后报value error:the selected Window is outside the bounds of the frame 然后我就又改了窗口大小 他又报最开始的那个错误 形成一个循环了

      发布在 OpenMV Cam
      么
      么西
    • memory error大佬帮忙看看 谢谢

      链接文本就是这上面的完整代码 但是运行错误 提示是:memory error:out of normal micropython heap memory!please reduce the resolution of the image you are running this algorithm on to bypass this issue!然后我就改了分辨率;有报错:value error:the selected Window is outside the bounds of the frame 我又改了大小 然后又回到了上面的第一个错误!

      发布在 OpenMV Cam
      么
      么西
    • RE: attribute error 谢谢大佬

      @yuan @kidswong999 回头试试 非常感谢

      发布在 OpenMV Cam
      么
      么西
    • RE: attribute error 谢谢大佬

      @kidswong999

      import sensor, image, time
      
      sensor.reset()                       
      sensor.set_contrast(3)
      sensor.set_pixformat(sensor.GRAYSCALE) 
      sensor.set_framesize(sensor.VGA)        
      sensor.set_windowing((128, 128))       
      sensor.skip_frames(time = 2000)         
      sensor.set_auto_gain(False)
      sensor.set_auto_exposure(False)
      
      while(True):
          img = sensor.snapshot()
          out = img.find_number(roi=(img.width()//2-14, img.height()//2-14, 28, 28))
          img.draw_rectangle((img.width()//2-15, img.height()//2-15, 30, 30))
          if out[1] > 5:
              print("Number: %d Confidence: %0.2f" %(out[0], out[1]))
      
      

      我先直接用的源码测试都不行

      发布在 OpenMV Cam
      么
      么西
    • RE: attribute error 谢谢大佬

      @kidswong999 谢谢 不过我买的OpenMV3 R2 怎么回事啊

      发布在 OpenMV Cam
      么
      么西
    • RE: attribute error 谢谢大佬

      @yuan 0_1532847656068_75a0221b-abcc-4ebf-95dd-9aad22f73c53-image.png 我已经导入了image 但是提示么有find_number这个函数 我查阅手册是有这个函数的

      发布在 OpenMV Cam
      么
      么西
    • attribute error 谢谢大佬

      attributeerror:'image' object has no attribute 'find_number'

      发布在 OpenMV Cam
      么
      么西