-
Notifications
You must be signed in to change notification settings - Fork 7
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 can i train my own model? #2
Comments
The original py-faster-rcnn allows training using Pascal VOC 2007/2010/2012 and COCO, and I have modified it to include the KITTI object dataset, where viewpoint labels are available. To train using KITTI:
Then, run the training script. If you run leaderboard.sh as it is, it will train my model to get the official results at here. Trained networks are saved under output/{experiment directory}/{dataset name}/. If you need to evaluate the results, you can create a test_*.sh script in experiments/scripts; then you can use this to obtain the KITTI official metrics. In case you want to use your own dataset, the process is unfortunately not so straightforward, and you will probably need to understand the code and modify it, particularly the one placed in lib/datasets. You can get some help in the official py-faster-rcnn repository; e.g. this issue. Another option is just adapting the annotations of the new dataset to follow the format of the KITTI (or Pascal, or COCO) annotations and "fake" its folder structure. Please keep in mind that my modifications should be dataset-agnostic, but I have not actually tested them outside the KITTI dataset. If you provide more details about what you are trying to do, maybe I can further help you. |
Hi @cguindel , thanks for your detailed answer sincerely.I use train_kitti_lsi_frcnn.sh to retrain the model.Is there any difference between leaderboard.sh and train_kitti_lsi_frcnn.sh? Can i use test_kitti_lsi_frcnn.sh to test my model? I am a starter in object detection,first i just want to finish my class project about car detection and viewpoint estimation.Again thanks very much. |
train_kitti_lsi_frcnn.sh is a former version which does not include some improvements that I've discovered later. I would strongly recommend using leaderboard.sh, if you want to detect Car/Pedestrian/Cyclist or leaderboard_7cls.sh, to train the model using all the available classes (Person_sitting, Tram, etc.) Do you want to obtain quantitative results (i.e., Average Precision, etc.)? If not, you do not need to use a test script. Otherwise, you will need to split the training set into train/validation subsets. To that end, you will need to modify this line in leaderboard.sh:
by
That way, you will be training with 3682 images and obtaining results based on 3799 validation images. I think this is the only change that you will need to undertake in order to re-train the model after the last commit 63dbdc3. Please try it and tell me what you got; once you have the model, I can help you to obtain detection stats if you need it. |
It's very nice of you to help me so much.My project only need to detect car and car's viewpoint.I want to change your code to classify only two class(car and background).Also,have you ever used continuous viewpoint estimation,that is to say, consider the problem as a regression problem..First,I should read your code carefully.Then I will try my best to do some change to fit my project.I will be grateful if you can help me to obtain quantitative results. |
To modify the number of classes, you need to change the parameter CLASSES in the configuration file under experiments/cfgs/ (in your case, you should set it to Regarding the continuous viewpoint estimation: yes, I am currently trying different alternatives (e.g., regression using Smooth L1 loss), but I have found that they do not improve the results, at least in terms of Average Orientation Similarity (the metric used in the KITTI benchmark). I plan to release the code to replicate these experiments, though; but that is a long-term project. If you finally achieve some results using this code, please let me know! |
Should I change the matrix H?because a problem occurs that |
I am closing this issue due to the lack of activity. |
How can i train my own model? I'll appreciate it !
The text was updated successfully, but these errors were encountered: