This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2EXEVM: How do I augment my sample

Part Number: TDA2EXEVM

Hi ,

I am now have a dateset to train using the ssdJacintoNetV2 ,but the distribution of my data categories is very uneven,list as blow,

I want to kow How do I augment my sample in the dataset?

Can I crop different categories of data into different folders?And my train.txt and val.txt can support this style just like list blow without voc Pascal label?

Thank you very much!

  • Hi,

    I forwarded your question to the respective team and waiting for their response.
    Thanks for your patience.

    Thanks,
    Praveen
  • We use LMDB as suggested by Caffe-SSD framework. You may check out the following link for LMDB preparation.

    https://github.com/weiliu89/caffe/blob/4817bf8b4200b35ada8ed0dc378dceaf38c539e4/README.md#preparation

    Our framework already does various augmentations. 

  • yes, I have completed the LMDB file according to the instructions. And it also can run normally on the EVM.

    But, because of My sample data distribute unbalanced, The recognition accuracy of training data is higher in the category with large sample size ,The recognition rate is low when the sample size is relatively small .  the train rusult list blow:

    What I want to know is, how do I make sure that the amount of data in category 1 stays the same, but I can augment the amount of data in other categories?

  • Hi,

    This kind of selective augmentation functionality is not straight forward and not supported in training framework, Caffe-Jacinto.
    On your original problem of accuracy low on certain classes, can you pls try training without car class and see if you get better accuracy on other classes?
    That will determine if class imbalance is the problem or not enough positive samples for other classes is the problem.

    Regards

  • I have been training according to what you said and looking for problems further。

    But I still have a question。Can I reduce the number of vehicle labels to achieve data balance?

    Can this cause the problem that the region samples originally belonging to vehicles to be taken as background by the ssdJacintoNetV2? that will reduce the recognition rate of vehicles?

    just like the image blow, there are many cars, but the car sample is too larger in my dataset, can I leave the car off the label in some picture? Will this cause the network to consider the vehicle as a negative sample?


  • HI,

    No you can not remove car labels from any picture if that is one of your training classes. You have two choices,

    1) Remove car from your training classes. 

    2) Keep car as one of the training classes but while creating LMDB remove pictures which has more instances of car than other objects to balance out different classes.

    I would suggest first one if you have not tried out already.

    Regards

  • Hi ,

    I am now have a train task of the identification of cars and the speed limit signs of tsr. Most of my training samples are a traffic sign with many cars, or all of them are cars.

    Can I replace the marked location map of the car with a negative sample of the speed limit sign,just like this blew?:

    This reduce the sample size of the car and increase the negative sample of speed limit signs?

  • I believe you will change the  shape of traffic sign to match with vehicle. This might degrade traffic sign performance. And also this is unnatural so I am not sure what will be behavior of object detect?

    Did you get chance to try my earlier suggestion, train SSD without car class?

  • Hi Soyeb,

    I don't think you understand me,My identification task now is to identify only vehicles and speed limit signs 30、40、50、60、80、100Km/h. There are only seven categories。The unnatural traffic signs I replace in the vehicle section are not in my identification task category。They are height limit signs or  weight limit signs.They will be treated as background。Can I modify the image like this?

  • yes,I have try to train SSD without car, the result is better than train SSD with car.

    But the mAP is not very high. loss is still stays at around 3.4。

    I want to know, in a perfect training, what are the proper values of loss and mAP?

  • Hi Soyeb,

    Can you help me with the question, which is very important to me and very confusing...

  • Hi,

    I think you can ignore loss value. You can mainly look at MAP value. It is not possible for me to say mAP you are getting is good enough for your application. To get some idea on what to expect out of SSD mAP, you may look up it's results which are publicly available.

    Other thing if after removing car class also if you are not getting required accuracy then  it probably indicates you don't have large enough dataset. You should add more examples of other categories.

    Regards

  • OK, I will look up the mAP about the training of SSD .

    I have a more difficult problem right now. In the identification of traffic signs, one kind of images often make mistakes, resulting in low identification errors.

    just show as blow. The left image is belong to the speed limit signs, which I need to recognize in my task, but the right image is very similar to the left,which not in my task. How can I strengthen my training for this situation?The right image is not marked in my sample.

  • I don't think SSD based object detect can handle such a fine difference between different classes. 

    Regards

  • Ok  anyway !

    Another question:I want to know if I set the inputdata's batchsize = 2,  Does the EVE compute two input graphs at the same time or does it cycle through them twice?

    input_shape {
      dim: 2
      dim: 1
      dim: 32
      dim: 32
    }

    I have two channels of camera image input, hoping to keep the computation synchronized。



  • Hi Soyeb,

    Can you answer my new questions?

  • Hi,

    I am closing this thread as I already answered this question in your new below thread. Please use below thread for further followup..

    Thanks,

    Praveen