Giter Club home page Giter Club logo

alfred's People

Contributors

111hh111 avatar ckmessi avatar gteti avatar lucasjinreal avatar nicholasjela avatar zmonteiro avatar zrruziev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred's Issues

glx error in pointcloud visualization.

For visualizing pointcloud, I use this repo.

In draw_pcs_open3d function (after passing the geometries to it),

I get the following error while it tries to create a visualization window:

~/anaconda3/envs/pointpillars/lib/python3.7/site-packages/alfred/vis/pointcloud/pointcloud_vis.py in draw_pcs_open3d(geometries)
     46         return False
     47     vis = visualization.Visualizer()
---> 48     vis.create_window()
     49     for g in geometries:
     50         vis.add_geometry(g)

RuntimeError: [Open3D ERROR] GLFW Error: GLX: Failed to create context: GLXBadFBConfig

Any idea how to fix this error?

any way to avoid installing opencv-contrib-python ?

I need to install this module for object detection task running on Jetson Nano
However it failed to install opencv-contrib-python, maybe it's about Arm architecture problem, I guess, can I avoid install opencv-contrib-python

Collecting alfred-py
  Using cached https://files.pythonhosted.org/packages/14/06/22789e703af1c65d762fb5cd4be849a95df959be3c717fa2d4fbac6c0665/alfred-py-2.5.21.tar.gz
Collecting colorama
  Using cached https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl
Collecting deprecated
  Using cached https://files.pythonhosted.org/packages/f6/89/62912e01f3cede11edcc0abf81298e3439d9c06c8dce644369380ed13f6d/Deprecated-1.2.7-py2.py3-none-any.whl
Collecting future
  Using cached https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz
Collecting loguru
  Using cached https://files.pythonhosted.org/packages/57/dd/be19f64691d250bbd98906254307abd626dbbd674b019a313f57d6338bc7/loguru-0.4.0-py3-none-any.whl
Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (from alfred-py) (4.2.1)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from alfred-py) (1.17.4)
ERROR: Could not find a version that satisfies the requirement opencv-contrib-python (from alfred-py) (from versions: none)
ERROR: No matching distribution found for opencv-contrib-python (from alfred-py)

AttributeError: 'NoneType' object has no attribute 'background_color'

Traceback (most recent call last):
File "core/pointpillars_detector.py", line 156, in
detector.predict_on_nucenes_local_file(sys.argv[1])
File "core/pointpillars_detector.py", line 146, in predict_on_nucenes_local_file
draw_pcs_open3d(geometries)
File "/usr/local/lib/python3.8/dist-packages/alfred/vis/pointcloud/pointcloud_vis.py", line 76, in draw_pcs_open3d
opt.background_color = np.asarray([0, 0, 0])
AttributeError: 'NoneType' object has no attribute 'background_color'

when following: https://pythonawesome.com/a-deep-learning-utility-library-for-visualization-and-sensor-fusion-purpose/

How to exit alfred data viewer?

There is not way to kill the process before looping through all the images under the folder.
Now, I need to use Ctrl + Z to put alfred to background and then kill %1 to kill the process.
Is there any more efficient way to do that?

cannot reshape array of size 1 into shape (0,2)

dalao你好,非常感谢alfred!今天尝试着使用alfred可视化了voc和coco,结果发现voc能够正常可视化,但coco好像有些问题。具体命令如下:

alfred data cocoview -j ./annotations/train.json -i ./train2017/

coco报错如下:

Alfred - Valet of Artificial Intelligence.
Author: Lucas Jin
At    : 20202.10.01, since 2019.11.11
Loc   : Shenzhen, China
Star  : http://github.com/jinfagang/alfred
Ver.  : 2.7.1

=> Module: data
=> Action: cocoview
loading annotations into memory...
Done (t=0.05s)
creating index...
index created!
INFO 04.16 17:48:22 view_coco.py:60: cats: [{'supercategory': 'insulator', 'id': 1, 'name': 'insulator'}]
INFO 04.16 17:48:22 view_coco.py:62: all images we got: 2208
checking img: {'height': 640, 'width': 640, 'id': 1, 'file_name': '772.jpg'}, id: 1
INFO 04.16 17:48:22 view_coco.py:73: showing anno: [{'segmentation': [[0.0]], 'iscrowd': 0, 'image_id': 1, 'area': 19434, 'bbox': [22, 248, 79, 246], 'category_id': 1, 'id': 1}, {'segmentation': [[0.0]], 'iscrowd': 0, 'image_id': 1, 'area': 16896, 'bbox': [272, 150, 66, 256], 'category_id': 1, 'id': 2}, {'segmentation': [[0.0]], 'iscrowd': 0, 'image_id': 1, 'area': 16960, 'bbox': [572, 36, 64, 265], 'category_id': 1, 'id': 3}]
Traceback (most recent call last):
  File "/home/ly/anaconda3/envs/evaluate/lib/python3.7/site-packages/alfred/alfred.py", line 307, in main
    vis_coco(img_d, json_f)
  File "/home/ly/anaconda3/envs/evaluate/lib/python3.7/site-packages/alfred/modules/data/view_coco.py", line 109, in vis_coco
    coco.showAnns(annos)
  File "/home/ly/anaconda3/envs/evaluate/lib/python3.7/site-packages/pycocotools/coco.py", line 258, in showAnns
    poly = np.array(seg).reshape((int(len(seg)/2), 2))
ValueError: cannot reshape array of size 1 into shape (0,2)
 parse args error, type -h to see help. msg: cannot reshape array of size 1 into shape (0,2)

想问一下是因为我的json格式和coco不一样造成的报错么?我这个coco格式是从voc那转化过来了,两者在mmdetection上都实践过,都是能正常训练和测试的,希望dalao能够告诉解决方案

ModuleNotFoundError: No module named 'alfred'

inconsistent version: expected '2.2022.10.17.1', but metadata has '2.2022.10.25.1'

I got this error from pip3:

alfred-py-2.2022.10.17.1.tar.gz has inconsistent version: expected '2.2022.10.17.1', but metadata has '2.2022.10.25.1'

Full log:

$ pip3 install alfred-py
Defaulting to user installation because normal site-packages is not writeable
Collecting alfred-py
  Using cached alfred-py-2.2022.10.17.1.tar.gz (1.8 MB)
  Preparing metadata (setup.py) ... done
Discarding https://files.pythonhosted.org/packages/9f/2d/832c6183c2fdd7815bea1057048bda188656adbc4ddc223a342321be94e5/alfred-py-2.2022.10.17.1.tar.gz (from https://pypi.org/simple/alfred-py/): Requested alfred-py from https://files.pythonhosted.org/packages/9f/2d/832c6183c2fdd7815bea1057048bda188656adbc4ddc223a342321be94e5/alfred-py-2.2022.10.17.1.tar.gz has inconsistent version: expected '2.2022.10.17.1', but metadata has '2.2022.10.25.1'
  Using cached alfred-py-2.12.6.tar.gz (232 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-r8x814pr/alfred_py.egg-info
      writing /tmp/pip-pip-egg-info-r8x814pr/alfred_py.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-r8x814pr/alfred_py.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-pip-egg-info-r8x814pr/alfred_py.egg-info/entry_points.txt
      writing requirements to /tmp/pip-pip-egg-info-r8x814pr/alfred_py.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-r8x814pr/alfred_py.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-r8x814pr/alfred_py.egg-info/SOURCES.txt'
      /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'find_packages'
        warnings.warn(msg)
      error: package directory 'alfred/fonts' does not exist
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed to run demo_o3d_server.py

After run pip install alfred-py, run script demo_o3d_server.py in examples dir get error:

❯❯❯ py .\demo_o3d_server.py
Traceback (most recent call last):
  File ".\demo_o3d_server.py", line 18, in <module>
    main()
  File ".\demo_o3d_server.py", line 8, in main
    cfg = get_default_visconfig()
  File "C:\Users\xq\miniconda3\envs\nn\lib\site-packages\alfred\vis\mesh3d\o3d_visconfig.py", line 87, in get_default_visconfig
    cfg = Config.load(
  File "C:\Users\xq\miniconda3\envs\nn\lib\site-packages\alfred\utils\base_config.py", line 21, in load
    cfg.merge_from_file(filename)
  File "C:\Users\xq\miniconda3\envs\nn\lib\site-packages\yacs\config.py", line 211, in merge_from_file
    with open(cfg_filename, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\xq\\miniconda3\\envs\\nn\\lib\\site-packages\\alfred\\vis\\mesh3d\\default_viscfg.yml'

Then found there is no assets and default_viscfg.yml under site-packages:

❯❯❯ ls -l
total 88
drwxrwxr-x    2 xq       xq            4096 Feb 27 15:32 __pycache__
-rw-rw-r--    1 xq       xq           35379 Feb 27 15:32 o3d_visconfig.py
-rw-rw-r--    1 xq       xq            8368 Feb 27 15:32 o3dsocket.py
-rw-rw-r--    1 xq       xq           15428 Feb 27 15:32 o3dwrapper.py
-rw-rw-r--    1 xq       xq            5552 Feb 27 15:32 skelmodel.py
-rw-rw-r--    1 xq       xq            9290 Feb 27 15:32 utils.py

So should I copy those files to site-packages as function get_default_visconfig do not allow arguments. Or other good suggestions?

Thanks!

ModuleNotFoundError: No module named 'pascal_voc_writer'

python3.7/site-packages/alfred/modules/data/mergevoc.py", line 39, in <module> from pascal_voc_writer import Writer ModuleNotFoundError: No module named 'pascal_voc_writer'
An unused python module (may has been deleted) pascal_voc_writer cause the error.
Just delete this line and reinstall the alfred code.
alfred/modules/data/mergevoc.py", line 39, in <module> from pascal_voc_writer import Writer

Then it works!

shape_predictor_68_face_landmarks.dat not fund.

Alfred - Valet of Artificial Intelligence.
Author: Lucas Jin
At : 20202.10.01, since 2019.11.11
Loc : Shenzhen, China
Star : http://github.com/jinfagang/alfred
Ver. : 2.7.1

=> Module: vision
=> Action: getface
Extract faces from ../data
Traceback (most recent call last):
File "/Users/MRJ/anaconda3/envs/python37/lib/python3.7/site-packages/alfred/alfred.py", line 256, in main
face_extractor = FaceExtractor()
File "/Users/MRJ/anaconda3/envs/python37/lib/python3.7/site-packages/alfred/modules/vision/face_extractor.py", line 46, in init
self.predictor = dlib.shape_predictor(predictor_path)
RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat
parse args error, type -h to see help. msg: Unable to open shape_predictor_68_face_landmarks.dat

win10下alfred保错

No.1
File "........\pip-install-pgy54cbe\alfred-py\setup.py", line 29, in
long_description = f.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x9c in position 5247: illegal multibyte sequence
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
No.2
安装alfred时会安装所需的包pycocotools在windows下安装会提示error: Failed building wheel for pycocotools

bug

 alfred data voc_view -i JPEGImages -l Annotations
Alfred - Valet of Artificial Intelligence.
Author: Lucas Jin
At    : 2018.11.11
Loc   : Shenzhen, China
Star  : http://github.com/jinfagang/alfred
Ver.  : 2.5.15

=> Module: scrap
=> Action: image
 parse args error, type -h to see help. msg: 'query'

Pip installation fails despite having colorama in dependencies

Got this error from a docker build of another system that depends on Alfred:
Ubuntu 20.04, Python 3.8.4, pip 22.0.2.

Collecting alfred-py
  Downloading alfred-py-2.10.0.tar.gz (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 51.6 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-dc1ysaug/alfred-py_3fa144628b9e4c4795003ef8f4b41a70/setup.py", line 32, in <module>
          from alfred.alfred import __VERSION__
        File "/tmp/pip-install-dc1ysaug/alfred-py_3fa144628b9e4c4795003ef8f4b41a70/alfred/alfred.py", line 31, in <module>
          from colorama import Fore, Back, Style
      ModuleNotFoundError: No module named 'colorama'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

no image found

when i use 'alfred vocview -i JPEGImages/ -l Annotations/' in my pic catalog,it appears
**Alfred - Valet of Artificial Intelligence.
Author: Lucas Jin
At : 20202.10.01, since 2019.11.11
Loc : Shenzhen, China
Star : http://github.com/jinfagang/alfred
Ver. : 2.7.1

=> Module: data
=> Action: vocview
INFO 08.19 01:53:30 view_voc.py:58: img root: JPEGImages/, label root: Annotations/
INFO 08.19 01:53:30 view_voc.py:61: label major will using xmls to found images... it might cause no image found
: cannot connect to X server
**

Roadmap

alfred is a system wide tools cabinet.

Now, you can install via pip install alfred-py

and you can get a as a command.

You can simple push your git repo by:

a ps

Every simple.

The tools added to alfred update as follow:

  1. a pl: or a pl origin master pull the git;
  2. a ps: push your project, and automatically commit;

ModuleNotFoundError: No module named 'alfred.dl'

python
Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import alfred.dl.torch.distribute.utils as comm

Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'alfred.dl'

using pip install aflred-py doesnot work

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.