Code Monkey home page Code Monkey logo

Comments (13)

Daniel-xsy avatar Daniel-xsy commented on August 17, 2024

I can run it successfully on my side. When running bash tools/generate_dataset.sh, you are expected in the ./corruptions folder. However, according to the error information, it seems to look for images within the ./corruptions folder. Please make sure the data_root in the config is correct.

If the above is correct, this might be caused by nuscenes_infos_val.pkl. nuScenes dataset path cannot be changed after you generate it, because it will save the image path the time you generate it. You can load it to check if the path is correct.

from robobev.

Daniel-xsy avatar Daniel-xsy commented on August 17, 2024

Yes, when generating the nuScenes-C dataset, it will use original loading, not custom loading. The latter is only used when benchmarking models.

from robobev.

jonyzhang2023 avatar jonyzhang2023 commented on August 17, 2024

when I remove all the exciting pkl file in my dataroot, it raised that ' No such file or directory: nuscenes_infos_temporal_val.pkl', when I link 'nuscenes_infos_temporal_val.pkl' again , it comes that img file does not exist: ./data/nuscenes/samples/CAM_FRONT/n015-2018-07-11-11-54-16+0800__CAM_FRONT__1531281439762460.jpg . which is not the dataroot I wrote in config, how can I fix it ?

from robobev.

Daniel-xsy avatar Daniel-xsy commented on August 17, 2024

How do you generate nuscenes_infos_temporal_val.pkl? I think the problem might be in this file.

from robobev.

jonyzhang2023 avatar jonyzhang2023 commented on August 17, 2024

I used bevdet data generation, in which I want to test it profermance.
So what is the right anno data in anno_root?

from robobev.

Daniel-xsy avatar Daniel-xsy commented on August 17, 2024

It depends on the model you want to test. If you want to test BEVDet, just need to follow it's repo to generate the .pkl file. You can use the following script to debug and check whether the image path in it is wrong.

import pickle
import os
import mmcv

# the annotation root, change it to your own
anno_path = '/nvme/konglingdong/models/RoboDet/data/nuscenes_infos_val_4d_interval3_max60.pkl'
data_root = '/nvme/share/data/sets/nuScenes/samples'
# save path of the correct anno file
save_path = '/nvme/konglingdong/models/RoboDet/data/nuscenes_infos_val_4d_interval3_max60_custom.pkl'

def main():

    with open(anno_path, 'rb') as f:
        anno = pickle.load(f)
    
    prog_bar = mmcv.ProgressBar(len(anno['infos']))
    for i in range(len(anno['infos'])):
        for sensor in anno['infos'][i]['cams'].keys():
           # check weather filename here is correct
            filename = os.path.split(anno['infos'][i]['cams'][sensor]['data_path'])[1]
            anno['infos'][i]['cams'][sensor]['data_path'] = os.path.join(data_root, sensor, filename)
        prog_bar.update()
    
    with open(save_path, 'wb') as f:
        pickle.dump(anno, f)

if __name__=='__main__':
    main()

from robobev.

Daniel-xsy avatar Daniel-xsy commented on August 17, 2024

Additionally, please check if you can run BEVDet on clean nuScenes dataset using tools/dist_test.sh. If so, the problem might not caused by the nuscenes_c.py config

from robobev.

jonyzhang2023 avatar jonyzhang2023 commented on August 17, 2024

it shows good
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 6019/6019, 5026.3 task/s, elapsed: 1s, ETA: 0s
so maybe I need to modify anno_file from nuscenes_infos_temporal_val.pkl to nuscenes_infos_val_4d_interval3_max60.pkl?

from robobev.

Daniel-xsy avatar Daniel-xsy commented on August 17, 2024

Actually, the name doesn't matter. If you set the data_root in the above script correctly, you can try using the newly generated anno file. Also, please check this #2 (comment).

from robobev.

jonyzhang2023 avatar jonyzhang2023 commented on August 17, 2024

I use this test and it shows good, so why I can not generate nuscenes-c? I am confused now .. I use the same dataroot

from robobev.

Daniel-xsy avatar Daniel-xsy commented on August 17, 2024

Please set a breakpoint here:

image_paths.append(cam_info['data_path'])

A simple work around: change the filepath manually here to the correct one.

from robobev.

jonyzhang2023 avatar jonyzhang2023 commented on August 17, 2024

Thanks for your kindness response, I just manually modified here and it works now.

from robobev.

Daniel-xsy avatar Daniel-xsy commented on August 17, 2024

I'm glad to hear that. we are sorry this repo is working in process and some parts haven't been well-organized. we will organize it later.

from robobev.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.