1 # Load validation dataset
2 dataset = final.CustomDataset()
----> 3 dataset.load_custom(CUSTOM_DIR, "val")
4
5 # Must call before using the dataset
~\Documents\wastedata-Mask_RCNN-multiple-classes-master\final.py in load_custom(self, dataset_dir, subset)
108 # }
109 # We mostly care about the x and y coordinates of each region
--> 110 annotations1 = json.load(open(r"C:\Users\Rakesh Kumar\Documents\wastedata-Mask_RCNN-multiple-classes-master\main\dataset\val\via_region_data.json"))
111 # print(annotations1)
112 annotations = list(annotations1.values()) # don't need the dict keys
~\anaconda3\lib\json_init_.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
291 kwarg; otherwise JSONDecoder is used.
292 """
--> 293 return loads(fp.read(),
294 cls=cls, object_hook=object_hook,
295 parse_float=parse_float, parse_int=parse_int,
~\anaconda3\lib\json_init_.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
355 parse_int is None and parse_float is None and
356 parse_constant is None and object_pairs_hook is None and not kw):
--> 357 return _default_decoder.decode(s)
358 if cls is None:
359 cls = JSONDecoder
~\anaconda3\lib\json\decoder.py in decode(self, s, _w)
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
~\anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Tried all json methods but no use, plz help if you get any idea
1 # Load validation dataset
2 dataset = final.CustomDataset()
----> 3 dataset.load_custom(CUSTOM_DIR, "val")
4
5 # Must call before using the dataset
~\Documents\wastedata-Mask_RCNN-multiple-classes-master\final.py in load_custom(self, dataset_dir, subset)
108 # }
109 # We mostly care about the x and y coordinates of each region
--> 110 annotations1 = json.load(open(r"C:\Users\Rakesh Kumar\Documents\wastedata-Mask_RCNN-multiple-classes-master\main\dataset\val\via_region_data.json"))
111 # print(annotations1)
112 annotations = list(annotations1.values()) # don't need the dict keys
~\anaconda3\lib\json_init_.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
291 kwarg; otherwise
JSONDecoderis used.292 """
--> 293 return loads(fp.read(),
294 cls=cls, object_hook=object_hook,
295 parse_float=parse_float, parse_int=parse_int,
~\anaconda3\lib\json_init_.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
355 parse_int is None and parse_float is None and
356 parse_constant is None and object_pairs_hook is None and not kw):
--> 357 return _default_decoder.decode(s)
358 if cls is None:
359 cls = JSONDecoder
~\anaconda3\lib\json\decoder.py in decode(self, s, _w)
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
~\anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Tried all json methods but no use, plz help if you get any idea