Coder Social home page Coder Social logo

pipra's Issues

Import mask (.mp4) using a folder of images

Export to mp4 only works for videos.

I get this error while trying to export the mask.

File .venv/lib/python3.10/site-packages/pipra/pipra.py", line 1005, in export

masks = self.stack.getMasks().astype(np.uint8).transpose(0,2,1)*255
AttributeError: 'list' object has no attribute 'astype'

Use pathlib library?

The Path object could elegantly replace all the os.path.join operations + existence checking + glob searches with more readable syntax

Drag and drop files

It would be neat to have the possibility of opening files by just drag and dropping them!

Flood fill not working

So I'm loading the dummy image, putting a single sphere in the middle, then using control click. This leads to the error below. Note that I've made the changes of np.bool -> bool, as mentioned in the other issue.

image

Failure at automatic mask creation on sample image

I opened (by mistake, not sure how this was supposed to happen wanted to report this as well) the demo segmentation stack (screenshot below) and took the chance to try the automatic grab cut mode. It seems to fail with the following error:

Traceback (most recent call last):
  File "/Users/luigipetrucco/anaconda3/envs/pipra/lib/python3.8/site-packages/pipra/pipra.py", line 438, in mouseReleaseEvent
    mask = GrabCut(im, 
  File "/Users/luigipetrucco/anaconda3/envs/pipra/lib/python3.8/site-packages/pipra/grabcut.py", line 24, in GrabCut
    mask, _, _ = cv2.grabCut(im.astype(np.uint8).copy(), # Original image
cv2.error: OpenCV(4.5.2) /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-req-build-iwig8vc6/opencv/modules/imgproc/src/grabcut.cpp:557: error: (-5:Bad argument) image must have CV_8UC3 type in function 'grabCut'

Relevant part of the conda list:

opencv-python             4.5.2.54                 pypi_0    pypi
openssl                   1.1.1k               h9ed2024_0  
pillow                    8.3.0                    pypi_0    pypi
pip                       21.1.3           py38hecd8cb5_0  
pipra                     0.3.3                    pypi_0    pypi
pyparsing                 2.4.7                    pypi_0    pypi
pyqt5                     5.15.4                   pypi_0    pypi
pyqt5-qt5                 5.15.2                   pypi_0    pypi
pyqt5-sip                 12.9.0                   pypi_0    pypi
pyqtgraph                 0.12.1                   pypi_0    pypi
python                    3.8.0                h359304d_2  

Screenshot:

Screenshot 2021-07-01 at 10 43 56

Error when loading images

image

Running into this issue when starting a new environment from scratch. Same error whether I attempt to load a file or hit cancel to load dummy data.

Below are environment files for the env I'm getting the problem in.
env.txt
env2.txt

Following the advice in the error fixes the problem. seems this needs to be changed.

Blacking and linting?

I would recommend little formatting tools like black/flake8/isort to make sure the package adhere to python formatting conventions.

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.