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

Strange missing arguments problem #5

Open
lyuweiwang opened this issue Jul 22, 2020 · 12 comments
Open

Strange missing arguments problem #5

lyuweiwang opened this issue Jul 22, 2020 · 12 comments

Comments

@lyuweiwang
Copy link

Dear Author,
When I run python test_tracking.py car_test_tracking_val, I met this problem:

Traceback (most recent call last):
File "test_tracking.py", line 102, in
embeds = model(points, None, xyxys, infer=True)
File "/tmp-data/lyuwei/miniconda3/envs/pointtrack/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
TypeError: forward() missing 3 required positional arguments: 'points', 'labels', and 'xyxys'

However, as it shows, no argument is missing when I call forward function the same as your implementation. How can I solve this problem?

Thanks

@detectRecog
Copy link
Owner

I believe you did not generate the segmentation results. Before tracking, please generate the segmentation first. As we can see in 'datasets.KittiMOTSDataset.MOTSTrackCarsValOffset', at Line 198, segmentation results should be available at 'os.path.join(systemRoot, 'SpatialEmbeddings/car_SE_val_prediction')'.

@lyuweiwang
Copy link
Author

lyuweiwang commented Jul 24, 2020

I believe you did not generate the segmentation results. Before tracking, please generate the segmentation first. As we can see in 'datasets.KittiMOTSDataset.MOTSTrackCarsValOffset', at Line 198, segmentation results should be available at 'os.path.join(systemRoot, 'SpatialEmbeddings/car_SE_val_prediction')'.

I do generate with command python -u test_mots_se.py car_test_se_to_save. One thing to notice is that the pickle files are not saved in 'os.path.join(systemRoot, 'SpatialEmbeddings/car_SE_val_prediction')'. I found them in 'os.path.join(rootDir, 'car_SE_val_prediction')'. The files are named as "0006_237.pkl". Do I use the right directory?
Moreover, the variables of points and xyxys have values.

@lyuweiwang
Copy link
Author

I believe you did not generate the segmentation results. Before tracking, please generate the segmentation first. As we can see in 'datasets.KittiMOTSDataset.MOTSTrackCarsValOffset', at Line 198, segmentation results should be available at 'os.path.join(systemRoot, 'SpatialEmbeddings/car_SE_val_prediction')'.

If I do not generate the segmentation results, there will be no data in 'dataset_it'. Thus, 'embeds = model(points, None, xyxys, infer=True)' will not run because the loop 'for sample in dataset_it' is omitted.

@RandomFool123
Copy link

@lyuweiwang Hi , I have the same problem as you. Because two of the four GPUs in the server are occupied, I try to change 4gpu parallelism into 2gpu parallelism in the code. But it still failed. Finally, the program can run normally after changing the multi GPU to a single GPU. But the result is a little strange, we can see that the indicators of 0013 video sequence seem to be incorrect.

QX46 { )%G8ON3D%5XGCN04

@lyuweiwang
Copy link
Author

@RandomFool123 However, I only use one GPU.

@RandomFool123
Copy link

@lyuweiwang You can try to set work_ nums=0 when loading data sets

@lyuweiwang
Copy link
Author

Finally, I realized that "./pointTrack_weights/PointTrack.pthCar" should be copied to "./car_finetune_tracking/checkpoint.pth" before I run "test_tracking.py". So, the problem is caused because the model has no parameters.

@lyuweiwang
Copy link
Author

@RandomFool123 My result is similar to yours. Maybe we should visualize the result of 0013.
image

@tehseenmayar
Copy link

@lyuweiwang Hi, I am also facing some strange error about check_point, i have correctly set the path to "pointTrack.pthCar" when i run "python test_tracking.py car_test_tracking_val". Can you tell what's causing this? @detectRecog
Screenshot from 2021-05-21 20-03-50

@XuqianRen
Copy link

@tehseenmayar You need to change the path that load the segmentation result in datasets/KittiMOTSDataset.py line199, 200

@duaaany
Copy link

duaaany commented Jun 10, 2021

Finally, I realized that "./pointTrack_weights/PointTrack.pthCar" should be copied to "./car_finetune_tracking/checkpoint.pth" before I run "test_tracking.py". So, the problem is caused because the model has no parameters.

Hi. I have copyed "./pointTrack_weights/PointTrack.pthCar" to "./car_finetune_tracking/checkpoint.pth" . But it still met “TypeError: forward() missing 3 required positional arguments: 'points', 'labels', and 'xyxys'” when I run "python -u test_mots_se.py car_test_se_to_save". Do you know why? Thanks.

@ShivaniSwadi
Copy link

Hi. @detectRecog i tried to run the code (myenv) C:\Users\Bharath\PointTrack>python -u test_mots_se.py car_test_se_to_save
but im getting this path error which i m unable to fix can you help me out.

File "C:\Users\Bharath\PointTrack\datasets\KittiMOTSDataset.py", line 129, in getitem
sample = self.get_data_from_mots(index)
File "C:\Users\Bharath\PointTrack\datasets\KittiMOTSDataset.py", line 118, in get_data_from_mots
instance = Image.open(os.path.join(self.mots_instance_root, path))
File "C:\Users\Bharath\anaconda3\envs\myenv\lib\site-packages\PIL\Image.py", line 3131, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Bharath/PointTrack/kittiRoot/instance\kittiRoot/instance\0002\000000.png'

it is not taking the right path for the instance directory

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

7 participants