nii-yamagishilab / PartialSpoof

BSD 3-Clause "New" or "Revised" License
27 stars 2 forks source link

Simply Explained Inference Steps #7

Closed ndisci closed 4 days ago

ndisci commented 1 week ago

Hello,

Thanks for the work. I tried to follow your "Using Pretrained Models" part of readme file in 03multireso folder.

I am confused about your repository. I downloaded your models and datasets. But I could not understand the next steps. Could you explain it simply ?

Where is your requirements.txt to create an environment ?

Which version we should install for s3prl to work properly ?

How can we run main.py from CLI ? For instance what does --module-model , --model-forward-with-file-name or --module-config args mean?

Thanks for your time.

zlin0 commented 1 week ago

Hi, thanks for your interest in PartialSpoof.

For environment-related questions, please carefully read and follow the instructions at 03multireso#prepare to build your environment. I didn't provide a requirements.txt because the environment for this repository fully follows the environment setup of s3prl#installation, as mentioned in the Readme.md.

For inference, you can find the command line in stage 2 of 00_run.sh, which can also be used in the CLI.

For the meaning of --module-model, --model-forward-with-file-name, and --module-config, detailed explanations can be found in arg_parse.py. These parameters follow the style of project-NN-Pytorch-scripts. You can find a more detailed tutorial in this repository.

ndisci commented 1 week ago

Thanks for the reply. I have already taken a look arg_parse.py but could not find any detailed explanation like help strings.

ndisci commented 1 week ago

Finally I could run the main.py and now "data_gen" in nn_manager_zl.py is "None". Because of that I got "No output saved" warning. End of the process I just got output_score pkls.

ndisci commented 1 week ago

@zlin0 Could you help me about the issue ? :)

zlin0 commented 1 week ago

Thanks for the reply. I have already taken a look arg_parse.py but could not find any detailed explanation like help strings.

could you check again and be careful? There are helping infos.

zlin0 commented 1 week ago

Finally I could run the main.py and now "data_gen" in nn_manager_zl.py is "None". Because of that I got "No output saved" warning. End of the process I just got output_score pkls.

Could you provide more info on that? How did you run experiments? Did you check whether you loaded the model and data properly? Have you checked output_score pkls?

ndisci commented 1 week ago

Hi @zlin0 ,

I did run experiment by moving some folders in the project and changing the project structure. I think you should add "--train-model" argument in run.sh for stage 2 in the CLI commands. When I followed s3prl environment setup , could not run the project. Because it needs extra packs. Now I am trying to run your metric calculation sh. To do this I will try to find a proper version for pyannote.metric.

Thanks for your time.

ndisci commented 6 days ago

Hi again,

Sorry to bother you but I could not run RangeERR or SegmentERR script because of not existing some files (label2num_2cls_0sil for example.) Also how can we get rttm file ?

zlin0 commented 6 days ago

Sorry to bother you but I could not run RangeERR or SegmentERR script because of not existing some files (label2num_2cls_0sil for example.) Also how can we get rttm file ?

sorry, that's my fault that I only mentioned this in another issue but forgot to upload it to the repo. please go to this answer to download the PS_data.tar.gz .

zlin0 commented 6 days ago

I did run experiment by moving some folders in the project and changing the project structure.

So please be careful when removing folders, as this might introduce some issues. This repo is based on some open-source projects like project-NN-Pytorch-scripts and s3prl.

I think you should add "--train-model" argument in run.sh for stage 2 in the CLI commands.

Again, please read carefully. We already have --module-model for the same purpose, which you asked at the beginning. As I answered before, detailed explanations for --module-model, --model-forward-with-file-name, and --module-config can be found in arg_parse.py. If you read carefully, you will find it helpful. Do you need me to copy it here?

    mes = 'module of model definition (default model, model.py will be loaded)'
    parser.add_argument('--module-model', type=str, default="model", help=mes)

When I followed s3prl environment setup , could not run the project. Because it needs extra packs.

Please make sure you download the specific version and the needed extra packages if there are any. Sorry, but I have no time to prepare a perfect introduction for preparing the environment right now, but I am sure everything will become easier after you build the environment for s3rpl#installation.

Now I am trying to run your metric calculation sh. To do this I will try to find a proper version for pyannote.metric.

Only RangeEER requires pyannote.metric, which provides DetectionCostFunction(). pyannote.metric has not been updated in the last two years. So, please download the latest one.

And sorry, I am occupied with other projects, so I am not able to make my repo perfect for now, and also answer you questions immediately. However, some friends have successfully re-implemented this repo, so I believe all issues related to enviorments can be resolved even if there are any.

ndisci commented 6 days ago

Thank you so much ! :)