-
Notifications
You must be signed in to change notification settings - Fork 6
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
problem in creating dataset_train and dataset_val #1
Comments
Do you have annotations.json or formatting of JSON file is right? |
yes already exist
Le mar. 19 mars 2019 à 11:08, JaeUng Hyun <[email protected]> a
écrit :
… Do you have annotations.json or formatting of JSON file is right?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/As2ht_ks7fGpKKWEr38EP0kKLhg7BWN1ks5vYLc7gaJpZM4b7sTU>
.
|
Error message said there is problem in JSON file. Did you check directory path of dataset? |
in fact there was another problem maybe it has relation with this...
i work with miniconda3 python3.6(tensorflow) and jupyter notebook and when
i sart running fish_detection.ipynb i had problem with downlowding google
colab it distrupt my jupyter notebook installation so i uninstall it and re
install it and it work again normally and i skiped the google colab block
so i was obliged to creat my own paths : i creat in images folder an "fish"
folder where the "train" folder were created
Le mar. 19 mars 2019 à 11:36, JaeUng Hyun <[email protected]> a
écrit :
… Error message said there is problem in JSON file. Did you check directory
path of dataset?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/As2ht42ix7LxoGo7cvjLIz7Kqs6A-uPVks5vYL26gaJpZM4b7sTU>
.
|
Oh, I didn't write my system. I'm running on Mac, using python 3.6.8, Tensorflow 1.13.1 through anaconda3. When you make dataset from annotation file, images and annotations file should be in /fish_project/images/fish. Good luck! |
# Load dataset
## annotations파일을 불러와서 클래스 구분되는 이름을 가져온다.
dataset_train, dataset_val =
det.create_datasets('C:\\Users\\OctaNet\\Miniconda3\\UnderTheSea-master\\fish_project\\images\\fish'+"\\train",
config)
i had this error:
fish_detection
…---------------------------------------------------------------------------JSONDecodeError
Traceback (most recent call
last)<ipython-input-10-b3d803b9b545> in <module> 1 # Load dataset
2 ## annotations파일을 불러와서 클래스 구분되는 이름을 가져온다.----> 3 dataset_train,
dataset_val = det.create_datasets('C:\\Users\\OctaNet\\Miniconda3\\UnderTheSea-master\\fish_project\\images\\fish'+"\\train",
config) 4
~\Miniconda3\UnderTheSea-master\fish_project\det.py in
create_datasets(dataset_dir, config, train_pct) 319 """ 320
--> 321 train_ann, val_ann = split_annotations(dataset_dir,
config, train_pct=train_pct) 322 323
print(annotation_stats(train_ann))
~\Miniconda3\UnderTheSea-master\fish_project\det.py in
split_annotations(dataset_dir, config, train_pct, annotation_filename,
randomize) 251 252 # Load annotations--> 253
annotations = json.load(open(os.path.join(dataset_dir,
annotation_filename))) 254 annotations =
list(annotations.values()) 255
~\Miniconda3\envs\tensorflow\lib\json\__init__.py in load(fp, cls,
object_hook, parse_float, parse_int, parse_constant,
object_pairs_hook, **kw) 297 cls=cls,
object_hook=object_hook, 298 parse_float=parse_float,
parse_int=parse_int,--> 299 parse_constant=parse_constant,
object_pairs_hook=object_pairs_hook, **kw) 300 301
~\Miniconda3\envs\tensorflow\lib\json\__init__.py in loads(s,
encoding, cls, object_hook, parse_float, parse_int, parse_constant,
object_pairs_hook, **kw) 352 parse_int is None and
parse_float is None and 353 parse_constant is None and
object_pairs_hook is None and not kw):--> 354 return
_default_decoder.decode(s) 355 if cls is None: 356
cls = JSONDecoder
~\Miniconda3\envs\tensorflow\lib\json\decoder.py in decode(self, s,
_w) 337 338 """--> 339 obj, end =
self.raw_decode(s, idx=_w(s, 0).end()) 340 end = _w(s,
end).end() 341 if end != len(s):
~\Miniconda3\envs\tensorflow\lib\json\decoder.py in raw_decode(self,
s, idx) 355 obj, end = self.scan_once(s, idx) 356
except StopIteration as err:--> 357 raise
JSONDecodeError("Expecting value", s, err.value) from None 358
return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[image: image.png]
Le mar. 19 mars 2019 à 12:04, JaeUng Hyun <[email protected]> a
écrit :
Oh, I didn't write my system. I'm running on Mac, using python 3.6.8,
Tensorflow 1.13.1 through anaconda3.
My code is working well on Colab and my laptop.
When you make dataset from annotation file, images and annotations file
should be in /fish_project/images/fish.
Good luck!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/As2ht_ATP0XOrvLvKIuqzYThOROC5_Uvks5vYMRKgaJpZM4b7sTU>
.
|
[image: image.png]
Le mar. 19 mars 2019 à 14:40, chbil siwar <[email protected]> a écrit :
… # Load dataset
## annotations파일을 불러와서 클래스 구분되는 이름을 가져온다.
dataset_train, dataset_val =
det.create_datasets('C:\\Users\\OctaNet\\Miniconda3\\UnderTheSea-master\\fish_project\\images\\fish'+"\\train",
config)
i had this error:
fish_detection
---------------------------------------------------------------------------JSONDecodeError Traceback (most recent call last)<ipython-input-10-b3d803b9b545> in <module> 1 # Load dataset 2 ## annotations파일을 불러와서 클래스 구분되는 이름을 가져온다.----> 3 dataset_train, dataset_val = det.create_datasets('C:\\Users\\OctaNet\\Miniconda3\\UnderTheSea-master\\fish_project\\images\\fish'+"\\train", config) 4
~\Miniconda3\UnderTheSea-master\fish_project\det.py in create_datasets(dataset_dir, config, train_pct) 319 """ 320 --> 321 train_ann, val_ann = split_annotations(dataset_dir, config, train_pct=train_pct) 322 323 print(annotation_stats(train_ann))
~\Miniconda3\UnderTheSea-master\fish_project\det.py in split_annotations(dataset_dir, config, train_pct, annotation_filename, randomize) 251 252 # Load annotations--> 253 annotations = json.load(open(os.path.join(dataset_dir, annotation_filename))) 254 annotations = list(annotations.values()) 255
~\Miniconda3\envs\tensorflow\lib\json\__init__.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 297 cls=cls, object_hook=object_hook, 298 parse_float=parse_float, parse_int=parse_int,--> 299 parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) 300 301
~\Miniconda3\envs\tensorflow\lib\json\__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 352 parse_int is None and parse_float is None and 353 parse_constant is None and object_pairs_hook is None and not kw):--> 354 return _default_decoder.decode(s) 355 if cls is None: 356 cls = JSONDecoder
~\Miniconda3\envs\tensorflow\lib\json\decoder.py in decode(self, s, _w) 337 338 """--> 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 340 end = _w(s, end).end() 341 if end != len(s):
~\Miniconda3\envs\tensorflow\lib\json\decoder.py in raw_decode(self, s, idx) 355 obj, end = self.scan_once(s, idx) 356 except StopIteration as err:--> 357 raise JSONDecodeError("Expecting value", s, err.value) from None 358 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[image: image.png]
Le mar. 19 mars 2019 à 12:04, JaeUng Hyun ***@***.***> a
écrit :
> Oh, I didn't write my system. I'm running on Mac, using python 3.6.8,
> Tensorflow 1.13.1 through anaconda3.
> My code is working well on Colab and my laptop.
>
> When you make dataset from annotation file, images and annotations file
> should be in /fish_project/images/fish.
>
> Good luck!
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/As2ht_ATP0XOrvLvKIuqzYThOROC5_Uvks5vYMRKgaJpZM4b7sTU>
> .
>
|
I don't know why it doesn't work. It is work well in my laptop. |
in fish_detection.ipynb
dataset_train, dataset_val = det.create_datasets(dataset_path+"\train", config)
I found this error please help me
JSONDecodeError Traceback (most recent call last)
in
1 # Load dataset
2 ## annotations파일을 불러와서 클래스 구분되는 이름을 가져온다.
----> 3 dataset_train, dataset_val = det.create_datasets(dataset_path+"\train", config)
4
~\Downloads\UnderTheSea-master\fish_project\det.py in create_datasets(dataset_dir, config, train_pct)
319 """
320
--> 321 train_ann, val_ann = split_annotations(dataset_dir, config, train_pct=train_pct)
322
323 print(annotation_stats(train_ann))
~\Downloads\UnderTheSea-master\fish_project\det.py in split_annotations(dataset_dir, config, train_pct, annotation_filename, randomize)
251
252 # Load annotations
--> 253 annotations = json.load(open(os.path.join(dataset_dir, annotation_filename)))
254 annotations = list(annotations.values())
255
~\Miniconda3\envs\tensorflow\lib\json_init_.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
297 cls=cls, object_hook=object_hook,
298 parse_float=parse_float, parse_int=parse_int,
--> 299 parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
300
301
~\Miniconda3\envs\tensorflow\lib\json_init_.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
352 parse_int is None and parse_float is None and
353 parse_constant is None and object_pairs_hook is None and not kw):
--> 354 return _default_decoder.decode(s)
355 if cls is None:
356 cls = JSONDecoder
~\Miniconda3\envs\tensorflow\lib\json\decoder.py in decode(self, s, _w)
337
338 """
--> 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
340 end = _w(s, end).end()
341 if end != len(s):
~\Miniconda3\envs\tensorflow\lib\json\decoder.py in raw_decode(self, s, idx)
355 obj, end = self.scan_once(s, idx)
356 except StopIteration as err:
--> 357 raise JSONDecodeError("Expecting value", s, err.value) from None
358 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered: