text-detection-ctpn icon indicating copy to clipboard operation
text-detection-ctpn copied to clipboard

ImportError: No module named 'utils.prepare'; 'utils' is not a package

Open OmriKaduri opened this issue 5 years ago • 9 comments

In split_label.py file, you have a broken import

Try change this:

from utils.prepare.utils import orderConvex, shrink_poly

to

from utils import orderConvex, shrink_poly

OmriKaduri avatar Mar 04 '19 14:03 OmriKaduri

您好,请问您用split_label生成的img_859.jpg的标签文件与源码中给的img_859.txt一样吗?

wangjiaod avatar Apr 13 '19 08:04 wangjiaod

I fix the problem with your solution,but when processing image ,it is error.Do you have meet the same problem?

Doloresru avatar Apr 23 '19 09:04 Doloresru

您好,请问您用split_label生成的img_859.jpg的标签文件与源码中给的img_859.txt一样吗?

hi ,what problem do you met?I output two empty fold

Doloresru avatar Apr 23 '19 10:04 Doloresru

I fix the problem with your solution,but when processing image ,it is error.Do you have meet the same problem?

I met the same problem as you. how do you solve you?

cellphonef avatar May 07 '19 11:05 cellphonef

Thanks very much!I try again .------------------ 原始邮件 ------------------ 发件人: "cellphonef"[email protected] 发送时间: 2019年5月7日(星期二) 晚上7:28 收件人: "eragonruan/text-detection-ctpn"[email protected]; 抄送: "wangjiaod"[email protected];"Comment"[email protected]; 主题: Re: [eragonruan/text-detection-ctpn] ImportError: No module named'utils.prepare'; 'utils' is not a package (#308)

I fix the problem with your solution,but when processing image ,it is error.Do you have meet the same problem?

I met the same problem as you. how do you solve you?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

wangjiaod avatar May 07 '19 11:05 wangjiaod

I fixed problem when change: +) pip install utils +) "from utils.prepare.utils import orderConvex, shrink_poly" to "from utils import orderConvex, shrink_poly"

Doan-Nguyen avatar May 23 '19 03:05 Doan-Nguyen

@Doan-Nguyen It seems that the problem is still not solved.Can you speak clearly?

yzq-123 avatar Jul 15 '19 11:07 yzq-123

modify the split_label.py: sys.path.append(os.path.join(os.getcwd(), 'utils/prepare')) from utils import orderConvex, shrink_poly

ShaominLi avatar Nov 29 '19 08:11 ShaominLi

@Doan-Nguyen It seems that the problem is still not solved.Can you speak clearly?

Hi @yzq-123, so sorry because reply so late. You can check my gist here. I recommend rename folder "utils" to "utils_model". https://gist.github.com/Doan-Nguyen/bb022dab02a8c875ebb7cc313449f7e6

Doan-Nguyen avatar Sep 26 '20 05:09 Doan-Nguyen