stardist / stardist

StarDist - Object Detection with Star-convex Shapes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crashing when loading pretrained models

sckaff opened this issue · comments

Describe the bug
Attempt to get keras version by "decoding UTF-8"
File - "./stardist/models/base.py:223", in StarDistBase.init(self, config, name, basedir),
Line 659 - "original_keras_version = f.attrs['keras_version'].decode('utf8')"
Error - AttributeError: 'str' object has no attribute 'decode'

To reproduce
Simply run "StarDist2D.from_pretrained('2D_paper_dsb2018')"

Expected behavior
The keras version might already be a string by simply calling "f.attrs['keras_version']", no need to decode a string.

Environment (please complete the following information):

  • stardist==0.8.3
  • csbdeep==0.7.3
  • tensorflow==2.2.1
  • OS: Linux
  • GPU memory (if applicable): M60