Coder Social home page Coder Social logo

lemontyc / rgbd-pepper-pose-estimation Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 0.0 76.31 MB

Documentation and code for "Sweet pepper recognition and peduncle pose estimation" thesis at the M.Sc. Engineering Sciences

License: MIT License

Shell 0.03% Dockerfile 0.01% Jupyter Notebook 87.92% HTML 11.85% Python 0.20%

rgbd-pepper-pose-estimation's People

Contributors

lemontyc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rgbd-pepper-pose-estimation's Issues

Python create dataset

Input

Parameters:

  • Validation size
  • Path to Via GG image annotator .json
  • Path to folder with the images contained in json
  • Output path

Example:

$ python create_dataset.py 20  /path/to/via/project.json  /path/to/imgs/folder  /output/path

Output:

In output/path/ there should be:

  • train/ <- folder
    • via_region_data.json <- .json with images only in train folder
    • ....png <- All images described in .json
    • ....
  • val/ <- folder
    • via_region_data.json
    • ....png
    • ....

From previous example, of the total number of images in json/img folder, 20% should be at val/, 80% should be at train/ folders.

[Frustum] PyQT or wxpython in containers

This command is needed on host computer to connect with container
jessfraz/dockerfiles#6 (comment)
Error below was created using current state of main branch (with wxpython)

An alternative could be to use pyqt5 and look into this issue

Another option is to try the Docker PyQT5 image and adapt it to load tensorflow.

root@38a9abbaefc2:/home/pepper/GitHub/frustum-pointnets/mayavi# python3 test_drawline.py 

** (test_drawline.py:675): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-dapztWTCtF: Connection refused
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
00:57:44: Debug: Adding duplicate image handler for 'Windows bitmap file'
00:57:44: Debug: Adding duplicate animation handler for '1' type
00:57:44: Debug: Adding duplicate animation handler for '2' type
00:57:44: Debug: Adding duplicate image handler for 'Windows bitmap file'
00:57:44: Debug: Adding duplicate animation handler for '1' type
00:57:44: Debug: Adding duplicate animation handler for '2' type
00:57:44: Debug: Adding duplicate image handler for 'Windows bitmap file'
00:57:44: Debug: Adding duplicate animation handler for '1' type
00:57:44: Debug: Adding duplicate animation handler for '2' type
/usr/local/lib/python3.5/dist-packages/traits/etsconfig/etsconfig.py:415: UserWarning: Environment variable "HOME" not set, setting home directory to /tmp
  % (environment_variable, parent_directory)
Traceback (most recent call last):
  File "test_drawline.py", line 18, in <module>
    test_plot3d()
  File "test_drawline.py", line 15, in test_plot3d
    l = plot3d(x, y, z, numpy.sin(mu), tube_radius=0.025, colormap='Spectral')
  File "/usr/local/lib/python3.5/dist-packages/mayavi/tools/helper_functions.py", line 38, in the_function
    return pipeline(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/mayavi/tools/helper_functions.py", line 78, in __call__
    scene = tools.gcf().scene
  File "/usr/local/lib/python3.5/dist-packages/mayavi/tools/figure.py", line 117, in gcf
    return figure(engine=engine)
  File "/usr/local/lib/python3.5/dist-packages/mayavi/tools/figure.py", line 69, in figure
    engine.new_scene(name=name, size=size)
  File "/usr/local/lib/python3.5/dist-packages/apptools/scripting/recordable.py", line 45, in _wrapper
    result = func(*args, **kw)
  File "/usr/local/lib/python3.5/dist-packages/mayavi/core/engine.py", line 452, in new_scene
    viewer = self.scene_factory(**factory_kwargs)
  File "/usr/local/lib/python3.5/dist-packages/mayavi/core/ui/mayavi_scene.py", line 89, in viewer_factory
    viewer.open()
  File "/usr/local/lib/python3.5/dist-packages/pyface/i_window.py", line 203, in open
    self._create()
  File "/usr/local/lib/python3.5/dist-packages/pyface/ui/wx/application_window.py", line 125, in _create
    contents = self._create_contents(self.control)
  File "/usr/local/lib/python3.5/dist-packages/tvtk/tools/ivtk.py", line 406, in _create_contents
    self.scene = self._scene_factory(parent)
  File "/usr/local/lib/python3.5/dist-packages/mayavi/core/ui/mayavi_scene.py", line 68, in mayavi_scene_factory
    s = MayaviScene(parent, stereo=p['stereo'])
  File "/usr/local/lib/python3.5/dist-packages/tvtk/pyface/ui/wx/decorated_scene.py", line 69, in __init__
    super(DecoratedScene, self).__init__(parent, **traits)
  File "/usr/local/lib/python3.5/dist-packages/tvtk/pyface/ui/wx/scene.py", line 288, in __init__
    super(Scene, self).__init__(parent, **traits)
  File "/usr/local/lib/python3.5/dist-packages/tvtk/pyface/tvtk_scene.py", line 222, in __init__
    self.control = self._create_control(parent)
  File "/usr/local/lib/python3.5/dist-packages/tvtk/pyface/ui/wx/decorated_scene.py", line 103, in _create_control
    self._panel)
  File "/usr/local/lib/python3.5/dist-packages/tvtk/pyface/ui/wx/scene.py", line 572, in _create_control
    stereo=self.stereo)
  File "/usr/local/lib/python3.5/dist-packages/vtk/wx/wxVTKRenderWindowInteractor.py", line 168, in __init__
    attribList=attribList)
NotImplementedError
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at /tmp/pip-install-cuqs8y5i/wxpython_ce308a364baf47658207cc34fc85bf9a/ext/wxWidgets/src/common/wincmn.cpp(470) in ~wxWindowBase(): any pushed event handlers must have been removed
root@38a9abbaefc2:/home/pepper/GitHub/frustum-pointnets/mayavi# 

RealSense and Mask R-CNN version compatibilty

Problem Description

Installing and maintaining tensorflow is very complicated. You need to correctly setup matching versions of CUDA, TF, Python and more stuff.

Because of this, a container-based development and deployment is being pursued.

Current Status

So far, I have trained, and ran mask R-CNN successfully in a container. However, this container does not process live camera information nor camera .bags. It requires manual extraction of png images from the bag files.

RealSense incompatibilty

  • RealSense python SDK allows openCV to load tensorflow 2.3.0 (GPU 2.2.0) trained models.
  • It also allows to load a TF model and run directly, however, this requires:
    • That the RealSense SDK is installed and running on a container
    • Or that TF is installed on the host system (which is what we wanted to avoid in the first place)

Possible solutions

  • Update mask r-cnn container to Intel's TensorFlow version and load the model with openCV in the host computer.
  • Containerize everything: Create a container with Intel RealSense SDK, that has access to the camera connected on the host computer, that runs TF and also has OpenCV

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.