Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

More specific example #7

Open
Luxato opened this issue Nov 16, 2018 · 21 comments
Open

More specific example #7

Luxato opened this issue Nov 16, 2018 · 21 comments
Labels

Comments

@Luxato
Copy link

Luxato commented Nov 16, 2018

Hello @ssaru ,

I'm trying to execute the script like this:
python example.py --datasets KITTI --img_path ./images/000021.jpg --label ./images/000021.txt --convert_output_path test.txt --img_type ".jpg" --manipast_path manipast.txt --cls_list_file names.txt

But it doesn't work. I don't understand what is manipast_path.
Would it be possible to add a more specific example where all the files are present in the git repository?

Thank you.

@ssaru
Copy link
Owner

ssaru commented Nov 18, 2018

Hi @Luxato
Ok I will adding more specific example

would you seperate image folder and label folder
like ./images/000021.jpg and ./labels/000021.txt

and then execute script file
--img_path and --label and --convert_output_path and --manipast_path is just directory path, not file path.

manifast file is just need for darknet framework

python3 example.py --datasets KITTI --img_path ./example/kitti/images/ --label ./example/kitti/labels/ --convert_output_path ./ --img_type ".jpg" --manipast_path ./ --cls_list_file names.txt

@Luxato
Copy link
Author

Luxato commented Nov 22, 2018

@ssaru Thanks for the effort. Would it be possible to also add an example for converting COCO?
COCO comes with multiple label files:

captions_train2017.json
captions_val2017.json
instances_train2017.json
instances_val2017.json
person_keypoints_train2017.json
person_keypoints_val2017.json

Which one should I put into --label folder/ ?

@Luxato Luxato reopened this Nov 22, 2018
@ssaru
Copy link
Owner

ssaru commented Nov 23, 2018

@Luxato

COCO dataset case is filepath!
like a --label folder/instances_train2017.json

caption_train & person_keypoints json file is not detection label

i will add contents later :)

@yjdeveloper
Copy link

@ssaru Would it be possible to also add an example for converting VOC to YOLO format?

@ssaru
Copy link
Owner

ssaru commented Nov 24, 2018

Hi @yjdeveloper
ok i will update until tomorrow

ssaru added a commit that referenced this issue Nov 25, 2018
@ssaru
Copy link
Owner

ssaru commented Nov 25, 2018

@Luxato , @yjdeveloper
pushed specific example (COCO, VOC)

would you check README?

ssaru added a commit that referenced this issue Nov 25, 2018
@Luxato
Copy link
Author

Luxato commented Nov 27, 2018

@ssaru Thank you.
This is just a minor error but when I tried to run COCO according to README I found out that some annotations in .names file are missing.

The error looks like this

YOLO Generating Result : False, msg : ERROR : 'motorcycle' is not in list, moreInfo : <class 'ValueError'> Format.py 704

So I had to add these annotations to the list:

motorcycle
potted plant
dining table
tv
couch
airplane

@ssaru
Copy link
Owner

ssaru commented Nov 27, 2018

@Luxato
thanks for error reporting
i will update soon!

ssaru added a commit that referenced this issue Nov 27, 2018
@yjdeveloper
Copy link

yjdeveloper commented Nov 27, 2018 via email

@Luxato
Copy link
Author

Luxato commented Nov 27, 2018

@yjdeveloper 80 images is a very small number for deep learning. Doesn't your model underfitting?

@yjdeveloper
Copy link

yjdeveloper commented Nov 27, 2018 via email

@Luxato
Copy link
Author

Luxato commented Nov 27, 2018

@yjdeveloper For very basic detection 80 could be enough. But I think detecting number plates is much more difficult. In general, for training deep learning model more images you have the better it will be. So I would collect 80 pictures more and compare how results changed.
Also, try to increase the detection threshold, that might remove the double bounding boxes.

@ssaru I hit another issue I don't know how to solve. Your script worked fine on the original COCO dataset. What I have done is that I left only one image in the dataset.
As you can see on the screenshot, COCO parsing went well, but Generating YOLO failed. Do you know where the problem can be? Thanks.

image

@ssaru
Copy link
Owner

ssaru commented Nov 28, 2018

you left only one image and *.json file had not changed?

would i get dataset as same with you for error reappearance

@yjdeveloper
Copy link

@Luxato Can you tell me which file I have to modify to change the threshold value?

@Luxato
Copy link
Author

Luxato commented Nov 28, 2018

@yjdeveloper Look at this page https://pjreddie.com/darknet/yolo/
especially this part:
image

@ssaru, Of course, I have changed the .json file as well. Here is how it looks like:
JSON file - http://github.stranovsky.cloud/annotations/instances_val2017_formatted_with_php.json
The first image from the COCO dataset - http://github.stranovsky.cloud/images/000000015335.jpg

the command I'm executing it:

python example.py --datasets COCO --img_path ./MYCOCO/images/ --label ./MYCOCO/annotations/instances_val2017_formatted_with_php.json --convert_output_path ./YOLO/ --img_type ".jpg" --manipast_path ./ --cls_list_file ./coco.names

@ssaru
Copy link
Owner

ssaru commented Dec 2, 2018

@Luxato
it's information mismatched

COCO json file have image_id key in annotations key.

it should match with id in images key.

but
JSON file(http://github.stranovsky.cloud/annotations/instances_val2017_formatted_with_php.json)
is not same with image_id in annotations and id in images

@yjdeveloper
Copy link

@Luxato Thank you for the information. Now I am using OpenCV to detect the same objects using trained weights from darknet but I am not getting the same output. I have used code from the following GitHub: https://github.com/arunponnusamy/object-detection-opencv/blob/master/yolo_opencv.py.

Please, can you give me some tips on where I can modify?

@lionverve2015
Copy link

@ssaru
I am having problems with this:
KITTI Parsing Result : False, msg : ERROR : , moreInfo : <class 'StopIteration'> Format.py 484

Do you have any suggestions? Thank You!

@Harsh-Vavaiya
Copy link

YOLO Generating Result : False, msg : ERROR : 'M_50s' is not in list, moreInfo : <class 'ValueError'> Format.py 704

ANYONE CAN HELP ME WITH THIS?

@alsawaf
Copy link

alsawaf commented Feb 7, 2020

@ssaru Thank you.
This is just a minor error but when I tried to run COCO according to README I found out that some annotations in .names file are missing.

The error looks like this

YOLO Generating Result : False, msg : ERROR : 'motorcycle' is not in list, moreInfo : <class 'ValueError'> Format.py 704

So I had to add these annotations to the list:

motorcycle
potted plant
dining table
tv
couch
airplane

i'm having same issue can you please explain in details how did you solve it ?

@raynbowy23
Copy link

@alsawaf @Harsh-Vavaiya

Use this labels file instead of suggesting labels.
It should work.

https://github.com/amikelive/coco-labels/blob/master/coco-labels-2014_2017.txt

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

No branches or pull requests

7 participants