Ask Your Question
0

for using readNET, should i have to train model with channel first input type?

asked 2020-06-07 21:17:34 -0600

Hello guys

I use two models Unet and googleNET V4 on python 3.8(openCV 4.2.2)

i want to make a dll file operating independently in device so i choose openCV

My question is for using openCV readNET function, should i have to train model on python channe first input type?

or using channel last input trained model on python is fine with openCV readNET?

thank you

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-06-08 02:43:58 -0600

berak gravatar image

updated 2020-06-08 02:45:17 -0600

to my knowledge, it is impossible to train convolutional layers using images in NHWC order

both GoogleNet and UNet use NCHW channel order, so rather leave it like that

edit flag offensive delete link more

Comments

I trained images(512x512x3) on model unet and googleNETV4.(input shape : channel last) so i got a pb file(model structure and weights) from .h5 file.

can i use this pb file with openCV readNET function to predict? of course i load image as channel first type in openCV C++ env

please give me a solution!

yagorgy gravatar imageyagorgy ( 2020-06-08 04:16:55 -0600 )edit

of course i load image as channel first type in openCV C++ env

no idea how you do that, opencv's samples use imread() / blobFromImage() for this purpose

berak gravatar imageberak ( 2020-06-08 04:30:11 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-06-07 21:17:34 -0600

Seen: 134 times

Last updated: Jun 08 '20