spreka / biomagdsb

This repository contains the codes to run the nuclei segmentation pipeline of the BIOMAG group inspired by Kaggle's Data Science Bowl 2018 competition
52 stars 15 forks source link

Error during pre-segmentation #2

Closed PetterRanefall closed 5 years ago

PetterRanefall commented 5 years ago

I get the following error when I try to run start_prediction_full.bat:

File "C:\Code\Python3\biomagdsb\FinalModel\segmentation.py", line 119, in Segment temp, , = cv2.findContours(temp, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE) ValueError: not enough values to unpack (expected 3, got 2) ERROR: "Error during pre-segmentation"

OpenCv30 commented 5 years ago

@PetterRanefall - I am facing the same problem. Time being, I have forced IF condition to False. Not seeing any degradation as such.

csmolnar commented 5 years ago

@PetterRanefall @OpenCv30 Could you please check your OpenCV version? The project requires 3.4.2.17. The earlier releases returned 2 values only.

PetterRanefall commented 5 years ago

I have OpenCV 4.1.1.26

csmolnar commented 5 years ago

The function declaration has 2 return values again in this new version: https://docs.opencv.org/4.1.1/d3/dc0/groupimgprocshape.html#gadf1ad6a0b82947fa1fe3c3d497f260e0 Downgrading your OpenCV to the suggested version should solve your problem.

spreka commented 5 years ago

@PetterRanefall @OpenCv30 can you please confirm if the issue was resolved by @csmolnar's suggestion?

PetterRanefall commented 5 years ago

I suppose the issue is solved by downgrading, but I am not so keen on doing the downgrade.