This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Replies: 1 comment
-
@mxnet-label-bot add [question, python] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i do as shown here #14164
import mxnet
test='C:/Users/Admin/Desktop/test.lst' # folder where must be my test.lst
DataSet='C:/Users/Admin/Downloads/mypic/' # folder with my pictures (20 pics)
then when i try
data_iter = mx.image.ImageIter(
batch_size=4,
data_shape=(3,816, 1232),
label_width=1,
path_imglist='test.lst',
path_root='DataSet')
for data in data_iter:
d = data.data[0]
break
here error
Traceback (most recent call last):
File "", line 1, in
NameError: name 'data_iter' is not defined
then
img =nd.transpose(d,(0,2,3,1))
print(img.shape)
io.imshow(img[0].asnumpy().astype(np.uint8))
io.show()
and the errors
when i try create step 2. make .rec file
train_iter = mx.image.ImageIter(
batch_size=32,
data_shape=(3, 816, 1232),
path_imgrec='data.rec',
path_imgidx='data.idx', #help shuffle performance
shuffle=True,
aug_list=[mx.image.HorizontalFlipAug(0.5)]
)
train_iter.reset()
for batch in train_iter:
x = batch.data[0]
break
img =nd.transpose(x,(0,2,3,1))
print(img.shape)
io.imshow(img[0].asnumpy().astype(np.uint8))
io.show()
i get the error
test='C:/Users/Admin/Desktop/test.rec'
Dataset='C:/Users/Admin/Downloads/mypic'
... train_iter.reset()
Traceback (most recent call last):
File "", line 2, in
NameError: name 'train_iter' is not defined
How to fix these errors to create .lst and .rec file?
here example of one of my picture form mypic
https://github.com/apache/incubator-mxnet/blob/master/example/captcha/captcha_example.png
Beta Was this translation helpful? Give feedback.
All reactions