-
Notifications
You must be signed in to change notification settings - Fork 94
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
unrecognized arguments and info = coco['info'] #1
Comments
Your coco dataset probably doesn't have info. Remove all instances of info in cocosplit.py, you're trying to reference something that isn't in your initial JSON data. |
@nofficer, @favervn and @akarazniewicz I ran coco_split via Colab for my custom dataset:
@nofficer, @favervn and @akarazniewicz Would you help me? |
it seems you forgot to put an exclamation mark (!) before python command in google colab. |
@minooei I tested it by placing (!) Before the python command in Google Colab. However, this error appeared below:
Any suggestions @minooei? |
@minooei I tried the alternative of copying the code from the cocosplit.py file in a cell and the output was this:
|
just simply delete lines 30,31 and change line 20:
you need some basic python knowledge. |
@minooei In the case where there is the term (info) should I delete it?
|
yes, since your dataset does not have any info you can delete or just replace with empty dict : {} |
@minooei Thanks, would you have any python courses that you could refer me to? |
|
@minooei Do you know if it is possible to change the ratio of the Script to 70 (training) / 15 (test) / and 15 (validation)? |
you can split the test set in two half and use it for validation
|
Can you explain to me how the ratio is by placing this line with train_size
= 0.5, how much is left for the other train and test?
z, y = train_test_split (y, train_size = 0.5)
Em seg, 18 de jan de 2021 18:42, mohammad minooei <[email protected]>
escreveu:
… @minooei <https://github.com/minooei> Do you know if it is possible to
change the ratio of the *Script* to 70 (training) / 15 (test) / and 15
(validation)?
you can split the test set in two half and use it for validation
x, y = train_test_split(images, train_size=args.split)
z, y = train_test_split(y, train_size=0.5)
save_coco(args.train, info, licenses, x, filter_annotations(annotations, x), categories)
save_coco(args.test, info, licenses, y, filter_annotations(annotations, y), categories)
save_coco('val.json', info, licenses, z, filter_annotations(annotations, z), categories)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK3B5AR6LYK5UIVCD7MV533S2STMXANCNFSM4NBKBJFQ>
.
|
don't let the names of the function and argument makes you confused. train_test_split is just a function that gets an array and split it by a ratio. you can call this function multiple times without affecting previous splits. |
But the second line, train_size = 0.1, is the percentage for Validation
only in this case? Because if I pass as parameter in the line of terminal
0.7 it is for train.json and 0.2 for test.json. Closing 100%. Is the logic
right?
Em seg, 18 de jan de 2021 19:27, mohammad minooei <[email protected]>
escreveu:
… Can you explain to me how the ratio is by placing this line with
train_size = 0.5, how much is left for the other train and test? z, y =
train_test_split (y, train_size = 0.5) Em seg, 18 de jan de 2021 18:42,
mohammad minooei ***@***.*** escreveu:
… <#m_-5322528320105522290_>
@minooei <https://github.com/minooei> https://github.com/minooei Do you
know if it is possible to change the ratio of the *Script* to 70
(training) / 15 (test) / and 15 (validation)? you can split the test set in
two half and use it for validation x, y = train_test_split(images,
train_size=args.split) z, y = train_test_split(y, train_size=0.5)
save_coco(args.train, info, licenses, x, filter_annotations(annotations,
x), categories) save_coco(args.test, info, licenses, y,
filter_annotations(annotations, y), categories) save_coco('val.json', info,
licenses, z, filter_annotations(annotations, z), categories) — You are
receiving this because you commented. Reply to this email directly, view it
on GitHub <#1 (comment)
<#1 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK3B5AR6LYK5UIVCD7MV533S2STMXANCNFSM4NBKBJFQ
.
don't let the names of the function and argument makes you confused.
train_test_split is just a function that gets an array and split it by a
ratio. you can call this function multiple times without affecting previous
splits.
https://datascience.stackexchange.com/questions/15135/train-test-validation-set-splitting-in-sklearn
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK3B5ATCDNCNVPVEQV2CWTDS2SYUJANCNFSM4NBKBJFQ>
.
|
@minooei Thanks for the explanation. (1) I formatted the code like this:
(2) Then at the terminal I tried to execute the following command: (3) However, the following error occurred, would you have any suggestions:
Would you help me? |
simply install funcy by: pip install funcy and result of the second split should be saved in test_Y , val_Z like this:
this means that the test_Y array will be split into two half and be saved in two new variables named test_Y, val_Z. |
you have had this problem one month ago and I answered back then. |
Please see my https://github.com/e1-io/echo1-coco-split library, based on this library. I've added support for train, valid, test, and a seed parameter for generation. @minooei , I've also fixed the key errors. This is published to pypi. |
I encounter this issue, please help me to solve it:
- When I type the full command:
python cocosplit.py --having-annotaions -s 0.8 D:/IMG_from_VID/COCO_Datasets/data/trainval.json train.json test.json
It shows this mess:
- When I remove the argument "--having-annotaions", it shows:
Thanks
The text was updated successfully, but these errors were encountered: