-
Notifications
You must be signed in to change notification settings - Fork 384
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
python test.py CenterNet-104 --testiter 20000 --split testing --debug #44
Comments
@wudi00 You need to modify the self._cat_ids in line 48 in db/coco.py |
@wudi00 I have modefied it, detection.py and sample/coco.py also be changed.But the question still remains. It can train the model, but can't test and validte. |
@wudi00 How do you make your own json file? Does the written dict contain the key "categories"? |
@Duankaiwen I modified the CenterNet-104.json to apply it to my data. |
categories should be like this: |
Yes, I generate the json file according to my dataset. |
can I see your josn file? just for "categories" part |
"categories": [{"supercategory": "none", "id": 0, "name": "android.widget.ImageView"}, {"supercategory": "none", "id": 1, "name": "android.widget.TextView"}, {"supercategory": "none", "id": 2, "name": "android.widget.ImageButton"}, {"supercategory": "none", "id": 3, "name": "android.view.View"}, {"supercategory": "none", "id": 4, "name": "android.widget.RelativeLayout"}, {"supercategory": "none", "id": 5, "name": "android.widget.LinearLayout"}, {"supercategory": "none", "id": 6, "name": "android.widget.FrameLayout"}, {"supercategory": "none", "id": 7, "name": "android.widget.EditText"}, {"supercategory": "none", "id": 8, "name": "android.widget.Button"}, {"supercategory": "none", "id": 9, "name": "android.widget.Image"}, {"supercategory": "none", "id": 10, "name": "android.widget.SeekBar"}, {"supercategory": "none", "id": 11, "name": "android.widget.Spinner"}, {"supercategory": "none", "id": 12, "name": "android.widget.ToggleButton"}, {"supercategory": "none", "id": 13, "name": "android.widget.ProgressBar"}, {"supercategory": "none", "id": 14, "name": "android.webkit.WebView"}, {"supercategory": "none", "id": 15, "name": "android.widget.ListView"}, {"supercategory": "none", "id": 16, "name": "android.widget.CheckedTextView"}, {"supercategory": "none", "id": 17, "name": "android.widget.Switch"}, {"supercategory": "none", "id": 18, "name": "android.widget.CheckBox"}, {"supercategory": "none", "id": 19, "name": "android.support.v7.app.ActionBar$Tab"}, {"supercategory": "none", "id": 20, "name": "android.support.v7.widget.RecyclerView"}, {"supercategory": "none", "id": 21, "name": "android.widget.RadioButton"}, {"supercategory": "none", "id": 22, "name": "com.fitness22.usermanager.model.Views.MutedVideoView"}, {"supercategory": "none", "id": 23, "name": "android.widget.MultiAutoCompleteTextView"}, {"supercategory": "none", "id": 24, "name": "android.widget.GridView"}, {"supercategory": "none", "id": 25, "name": "android.widget.RatingBar"}, {"supercategory": "none", "id": 26, "name": "android.widget.ScrollView"}, {"supercategory": "none", "id": 27, "name": "android.widget.VideoView"}, {"supercategory": "none", "id": 28, "name": "com.jotterpad.widget.jbmr2_kk.EditText"}, {"supercategory": "none", "id": 29, "name": "android.support.v4.view.ViewPager"}, {"supercategory": "none", "id": 30, "name": "android.widget.ViewSwitcher"}, {"supercategory": "none", "id": 31, "name": "android.widget.HorizontalScrollView"}, {"supercategory": "none", "id": 32, "name": "io.apptik.widget.MultiSlider$Thumb"}, {"supercategory": "none", "id": 33, "name": "com.zhiliaoapp.musically.activity.util.TextureVideoView"}]} |
There are 33 categories, why the "categories": 49 is your classes number? |
I know what's wrong.There are only 33 json file categories generated with the test set, but 49 for all categories.Thanks. |
@wudi00 the categories start with 0? And you have 34 categories. I have a problem in test. |
When I use test.py, there is such error
Traceback (most recent call last): File "test.py", line 100, in <module> test(testing_db, args.split, args.testiter, args.debug, args.suffix) File "test.py", line 62, in test testing(db, nnet, result_dir, debug=debug) File "/media/disk/wudi/CenterNet/test/coco.py", line 321, in testing return globals()[system_configs.sampling_function](db, nnet, result_dir, deb File "/media/disk/wudi/CenterNet/test/coco.py", line 290, in kp_detection cat_name = db.class_name(j) File "/media/disk/wudi/CenterNet/db/coco.py", line 106, in class_name cat = self._coco.loadCats([cat_id])[0] File "data/coco/PythonAPI/pycocotools/coco.py", line 218, in loadCats return [self.cats[id] for id in ids] File "data/coco/PythonAPI/pycocotools/coco.py", line 218, in <listcomp> return [self.cats[id] for id in ids] KeyError: 34
I have modified the class id, why occur this error? How to solve it? Thanks.
The text was updated successfully, but these errors were encountered: