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

How to filter only stop sign and pedestrian #29

Closed
sudonto opened this issue Feb 8, 2018 · 11 comments
Closed

How to filter only stop sign and pedestrian #29

sudonto opened this issue Feb 8, 2018 · 11 comments

Comments

@sudonto
Copy link

sudonto commented Feb 8, 2018

Great work! Btw, I want to train the model but stuck in this step:

"Follow instructions in the LISA Traffic Sign Dataset to create 'mergedAnnotations.csv' such that only stop signs and pedestrian crossing signs are shown"

How do I filter all except stop sign and pedestrian cross? I read the mergeAnnotationFiles.py but no clue. Please help me.

@YashBansod
Copy link

Can someone please specify the arguments to pass to the mergeAnnotationFiles.py for doing this?

While the pwd being the $LISA/tools directory of the dataset I tried:

  • python mergeAnnotationFiles.py frame mergeAnnotations.csv ../
  • python mergeAnnotationFiles.py frame mergeAnnotations.csv ../aiua120214-0/frameAnnotations-DataLog02142012_external_camera.avi_annotations
  • python mergeAnnotationFiles.py video mergeAnnotations.csv ../aiua120214-0/frameAnnotations-DataLog02142012_external_camera.avi_annotations

but the output always comes: No annotation files found, exiting...

please help me out.

@YashBansod
Copy link

YashBansod commented Feb 17, 2018

Okay I found a way of at least running the mergeAnnotationFiles.py.

I copied it to the $LISA folder and ran the following code:
python mergeAnnotationFiles.py frame mergeAnnotations.csv

this merged all the annotations from frames present at any sub directory of the $LISA directory. But I still cannot find a way to merge only annotations of stop signs and pedestrian crossing signs.

@sudonto
Copy link
Author

sudonto commented Feb 17, 2018

@YashBansod,

I think we have to modify mergeAnnotation.py such that only signs we want to put in csv file.

@YashBansod
Copy link

YashBansod commented Feb 17, 2018

@sudonto if you were able to filter only stop and pedestrian signs please tell how you did it.

I am currently able to extract only pedestrian and stop signs using:
python extractAnnotations.py -f stopAhead -f pedestrianCrossing copy ../allAnnotations.csv

this creates a folder named annotations which will contain all the pics where pedestrianCrossing and stopAhead signs are available.

But I am still unable to build the annotations for them

I even tried:
python mergeAnnotationFiles.py frame mergedAnnotations.csv annotations/
still I find that the mergedAnnotations.csv is the same as allAnnotations.csv

@sudonto
Copy link
Author

sudonto commented Feb 17, 2018

@YashBansod,

I will let you know soon I have the solution.

@sudonto
Copy link
Author

sudonto commented Feb 20, 2018

Hey @YashBansod ,

I was able to build only stop sign and pedestriancrosssing sign into one csv file. In my case, I use filterAnnotationFile.py first to generate those signs into seperate folder and then execute mergeAnnotationFiles.py to combine 2 csv file (stop and pedestrian sign) into one file.

Please try.

@YashBansod
Copy link

Hi @sudonto
Sorry for the late reply. I was able to get this thing working. In issue #21 steps mentioned by @jacksmith21 are sufficient to run get the code working. the mergeAnnotationFiles.py just merges all the annotations in all the sub-directories, but the dataprep.py handles the seperation of the pedestrian and stop sign images. The documentation of this was a bit misleading, causing a lot of my time to be wasted just on figuring on how to make this work. Anyway the output was not satisfactory for my application and I couldn't replicate the outputs mentioned in the readme of this repository, so I started looking elsewhere.

@sudonto
Copy link
Author

sudonto commented Feb 26, 2018

@YashBansod ,

Yes, you absolutely correct about this. I started to analyze each code of dataprep.py week ago and I found that there is a line of code that filters out the annotation tag other than the desired signs.

Now, I have 2 problems afterward: my loss function is very large (arround 200 after 200 epochs) and the produced model always give me an error in inference mode (division by zero when calculating the IoU, sighhh).

I think I'd like to search for another SSD algorithms.

PS.: In case you find another robust SSD algorithm yet offer simple code, would you mind to share with me? :)

@YashBansod
Copy link

@sudonto I didn't get any div by zero errors and don't really understand why its happening for you, but you can try re cloning the repo and do the changes I mentioned in #27 and it should work. Also, my loss was even bigger. It was around 500 after 200 epochs and around 400 after 2000 epochs. Furthermore, in tensorboard, I could see that my model was over fitting. Instead of working on SSDs, which I was even testing in the first place as an alternative to Faster RCNNs, I would rather put my effort on YOLO v2. Anyway, am currently involved in a different project but if I do find a good SSD implementation, I will post it here.

@YashBansod
Copy link

@sudonto were you able to run the python inference.py -m demo with the pre-trained model provided by the creator of this repo?

@sudonto
Copy link
Author

sudonto commented Feb 28, 2018

Yes, I was able to run python inference.py -m demo with success using pre-trained model, showing images in sample_images folder with bounding box (no division by zero).

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