Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtf.Dataset() in weapon detection example of gluonCV finetune gives error #26

Closed
Shreyashwaghe opened this issue Apr 10, 2020 · 3 comments

Comments

@Shreyashwaghe
Copy link
Contributor

When execute the command --> gtf.Dataset(root, img_dir, anno_file, batch_size=batch_size);
i get this error, (i am working with jypter nb on a amd cpu and amd gpu machine)

MXNetError Traceback (most recent call last)
in
----> 1 gtf.Dataset(root, img_dir, anno_file, batch_size=batch_size);

~/Desktop/Monk AI Object/Monk_Object_Detection-master/example_notebooks/1_gluoncv_finetune/1_gluoncv_finetune/lib/detector_prototype.py in Dataset(self, root, img_dir, anno_file, batch_size, num_workers)
104 os.system(cmd2);
105
--> 106 self.system_dict["local"]["train_dataset"] = gcv.data.RecordFileDetection('train.rec')
107
108

~/anaconda3/lib/python3.7/site-packages/gluoncv/data/recordio/detection.py in init(self, filename, coord_normalized)
64 """
65 def init(self, filename, coord_normalized=True):
---> 66 super(RecordFileDetection, self).init(filename)
67 self._coord_normalized = coord_normalized
68

~/anaconda3/lib/python3.7/site-packages/mxnet/gluon/data/vision/datasets.py in init(self, filename, flag, transform)
244 """
245 def init(self, filename, flag=1, transform=None):
--> 246 super(ImageRecordDataset, self).init(filename)
247 self._flag = flag
248 self._transform = transform

~/anaconda3/lib/python3.7/site-packages/mxnet/gluon/data/dataset.py in init(self, filename)
182 self.idx_file = os.path.splitext(filename)[0] + '.idx'
183 self.filename = filename
--> 184 self._record = recordio.MXIndexedRecordIO(self.idx_file, self.filename, 'r')
185
186 def getitem(self, idx):

~/anaconda3/lib/python3.7/site-packages/mxnet/recordio.py in init(self, idx_path, uri, flag, key_type)
243 self.key_type = key_type
244 self.fidx = None
--> 245 super(MXIndexedRecordIO, self).init(uri, flag)
246
247 def open(self):

~/anaconda3/lib/python3.7/site-packages/mxnet/recordio.py in init(self, uri, flag)
69 self.pid = None
70 self.is_open = False
---> 71 self.open()
72
73 def open(self):

~/anaconda3/lib/python3.7/site-packages/mxnet/recordio.py in open(self)
246
247 def open(self):
--> 248 super(MXIndexedRecordIO, self).open()
249 self.idx = {}
250 self.keys = []

~/anaconda3/lib/python3.7/site-packages/mxnet/recordio.py in open(self)
77 self.writable = True
78 elif self.flag == "r":
---> 79 check_call(_LIB.MXRecordIOReaderCreate(self.uri, ctypes.byref(self.handle)))
80 self.writable = False
81 else:

~/anaconda3/lib/python3.7/site-packages/mxnet/base.py in check_call(ret)
251 """
252 if ret != 0:
--> 253 raise MXNetError(py_str(_LIB.MXGetLastError()))
254
255

MXNetError: [12:22:37] src/io/local_filesys.cc:209: Check failed: allow_null: LocalFileSystem::Open "train.rec": No such file or directory
Stack trace:
[bt] (0) /home/shreyash/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x2b94bf8) [0x7f329a933bf8]
[bt] (1) /home/shreyash/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x2b8c7ca) [0x7f329a92b7ca]
[bt] (2) /home/shreyash/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(MXRecordIOReaderCreate+0x2d) [0x7f329a07d58d]
[bt] (3) /home/shreyash/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7f32c7365ec0]
[bt] (4) /home/shreyash/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7f32c736587d]
[bt] (5) /home/shreyash/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7f32c757bf7e]
[bt] (6) /home/shreyash/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x139b4) [0x7f32c757c9b4]
[bt] (7) /home/shreyash/anaconda3/bin/python(_PyObject_FastCallKeywords+0x49b) [0x555ba7021d2b]
[bt] (8) /home/shreyash/anaconda3/bin/python(_PyEval_EvalFrameDefault+0x537e) [0x555ba707d7ae]

@abhi-kumar
Copy link
Contributor

Please check if "train.rec" if formed somewhere in your workspace

@Shreyashwaghe
Copy link
Contributor Author

train.lst is formed, not train.rec

@abhi-kumar
Copy link
Contributor

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants