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

Apply different lr scheduler of pytorch for yolact++ #736

Open
Elizbellou opened this issue Feb 16, 2022 · 4 comments
Open

Apply different lr scheduler of pytorch for yolact++ #736

Elizbellou opened this issue Feb 16, 2022 · 4 comments

Comments

@Elizbellou
Copy link

Hello, I would like to change the default lr scheduler for yolact using one of the pytorch lr schedulers in an attempt to improve mAP (I use September's update yolact++ with custom dataset). So, in which file should I make changes and which lines? Thank u in advance for your help

@JayParikh20
Copy link

@Elizbellou did you find any solution for this?

@Elizbellou
Copy link
Author

@Elizbellou did you find any solution for this?

Sorry, for the delay.aybe you've already found a solution. I didn't exactly used a lr scheduler algorithm, however by just changing lr and lr steps according to max iterations in the config file, it raised mAP about 2-4%. By default it multiplies lr0 with 0.1 at every lr step, if I remember well.. So, to your question if you find the file where this math equation is defined, u can change that with your own schedule. If changes to other files are required I guess it will bring up an error so you go along and fix it.

@Jessica-hub
Copy link

Hi Can you let me know how did you install the YOLACT++?

@Elizbellou
Copy link
Author

Elizbellou commented Dec 21, 2024

@Jessica-hub Hi, it's been a long time but according to my notes, I started just like yolact , git clone yolact, prepare dataset and do the custom modifications in config file, but then I followed some steps to apply deformable convolutions: 1. I got torch=1.1+cu8
!pip install cython !pip install opencv-python pillow pycocotools matplotlib !pip install torch==1.8.0 !pip install torchvision==0.9.0 !pip install torchaudio==0.8.0 !pip install cudatoolkit==8.0 import torch from IPython.display import Image, clear_output # to display images
2. then set up the NVIDIA CUDA Toolkit (version 8.0) and installed compiler GCC/g++5
!apt update -qq; !wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb; !dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb; !apt-key add /var/cuda-repo-8-0-local-ga2/7fa2af80.pub; !apt-get update -qq; !apt-get install cuda gcc-5 g++-5 -y -qq; !ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc; !ln -s /usr/bin/g++-5 /usr/local/cuda/bin/g++; !apt install cuda-8.0;
#set path import os os.environ['PATH'] += ':/usr/local/cuda/bin'

  1. Compiled DCNv2 and setup built according to YOLACT++ instructions (https://github.com/DataXujing/yolact_pytorch):

%cd external/DCNv2 !python setup.py build develop
4. Finally, run the python train.py command with your config file epochs etc...
Actually no3 step is the main part to train yolact++ and what differentiates it from yolact. But without the proper CUDA and GCC versions, the setup.py process failed. Maybe pytorch and other dependencies versions work as well now, just sharing what worked for me.
I run training in colab notebook.
Hope this helps.

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

3 participants