Problem met when testing
See original GitHub issueDescribe the bug
- I used a customized datasets to train and test yolox+bytetrack model.
- I used the training script to train bytetrack and got
epoch_80.pth
. - Then I used it as checkpoint and test it on my datasets.
- I run the testing script shown below. After the detecting procedure, an error occured
AssertionError: Dataset and results have different sizes: 3724 v.s. 2
- Additionally, my datasets consists of satellites videos and contains 4 classes
car
plane
ship
train
. Could the error be because the testing script only support single class MOT?
Reproduction
- What command or script did you run?
PORT=29514 ./tools/dist_test.sh configs/mot/bytetrack/bytetrack_yolox_s_512_alltrain_sat.py 1 --checkpoint work_dirs/bytetrack_yolox_s_512_alltrain_sat/epoch_80.pth --out results.pkl --eval bbox track
- Did you make any modifications on the code or config? Did you understand what you have modified?
- I used a customized datasets and changed the data path in config.
- What dataset did you use and what task did you run?
- Satellites videos. 4 classes. Training + Validation.
- Train YOLOx detector and got
epoch_80.pth
. - Test the model on the datasets and encounter the problem.
Environment
sys.platform: linux
Python: 3.7.0 | packaged by conda-forge | (default, Nov 12 2018, 20:15:55) [GCC 7.3.0]
CUDA available: False
GCC: gcc (GCC) 5.4.0
PyTorch: 1.7.1
PyTorch compiling details: PyTorch built with:
- GCC 7.3
- C++ Version: 201402
- Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- NNPACK is enabled
- CPU capability usage: AVX2
- Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,
TorchVision: 0.8.2
OpenCV: 4.5.5
MMCV: 1.4.5
MMCV Compiler: GCC 5.4
MMCV CUDA Compiler: 10.1
MMTracking: 0.10.0+
Error traceback
Traceback (most recent call last):
File "./tools/test.py", line 224, in <module>
main()
File "./tools/test.py", line 214, in main
metric = dataset.evaluate(outputs, **eval_kwargs)
File "/cluster/home/it_stu12/main/SatVideoDT/mmdetection/mmdet/datasets/dataset_wrappers.py", line 108, in evaluate
('Dataset and results have different sizes: '
AssertionError: Dataset and results have different sizes: 3724 v.s. 2
Traceback (most recent call last):
File "/cluster/home/it_stu12/.conda/envs/SatVideoDT/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/cluster/home/it_stu12/.conda/envs/SatVideoDT/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/cluster/home/it_stu12/.conda/envs/SatVideoDT/lib/python3.7/site-packages/torch/distributed/launch.py", line 260, in <module>
main()
File "/cluster/home/it_stu12/.conda/envs/SatVideoDT/lib/python3.7/site-packages/torch/distributed/launch.py", line 256, in main
cmd=cmd)
subprocess.CalledProcessError: Command '['/cluster/home/it_stu12/.conda/envs/SatVideoDT/bin/python', '-u', './tools/test.py', '--local_rank=0', 'configs/mot/bytetrack/bytetrack_yolox_s_512_alltrain_sat.py', '--launcher', 'pytorch', '--checkpoint', 'work_dirs/bytetrack_yolox_s_512_alltrain_sat/epoch_80.pth', '--out', 'results.pkl', '--eval', 'bbox', 'track']' returned non-zero exit status 1.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Statewide Testing: Problem or Solution for Failing Schools?
A proposal by the Bush Administration to test all U.S. children in grades 3-8 has been met by mixed reactions from parents and...
Read more >Teaching and testing mathematical problem solving by ... - jstor
Teaching and testing mathematical problem solving by offering optional assistance. JOOST MEI JER1 & FRÉ RIEMERSMA2. SCO-Kohnstamm Institute, Department of ...
Read more >Problems and Solutions—TELPAS - Texas Education Agency
Solution: In the event of a schoolwide emergency that causes a disruption in testing, ensuring the safety of students is top priority.
Read more >Computer problems cause school testing angst - again
CAPITAL REGION — Students and teachers were met with delays Tuesday as they tried to log in to computer-based state English language arts ......
Read more >9 Hypothesis Tests
Comparison of test statistic to critical region to draw initial conclusions. 4. Calculation of p-value. 5. Conclusion, written in terms of the original...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
But I’ve already set num_classes to 4 in my config and still encounter the problem.
Hi, i am using the
demo_mot_vis.py
script to run inference withbytetrack_yolox_x_crowdhuman_mot17-private-half.py
as config. My goal is MOT on multi-class, result is as wanted but looking into config file the base filebytetrack_yolox_x_crowdhuman_mot17-private-half.py
at line 14 hasbbox_head=dict(num_classes=1),
. Now i am trying to understand, how can i define the number of classes and the specific classes to consider?