open-mmlab / mmselfsup

OpenMMLab Self-Supervised Learning Toolbox and Benchmark
https://mmselfsup.readthedocs.io/en/latest/
Apache License 2.0
3.14k stars 429 forks source link

using simclr for new downstream task #751

Open alaa-shubbak opened 1 year ago

alaa-shubbak commented 1 year ago

Checklist

  1. I have searched related issues but cannot get the expected help. yes
  2. I have read the FAQ documentation but cannot get the expected help. yes

I am trying to use mmselfsup for another down streaming tasks rather than only object detection and segmentation.

i am using your model of simclr and the existed weight in your website . and trying to do the downstreaming task on my dataset.

i got this error message as bellow:

error_mmpose_mmself1 error_mmpose_mmself2

any help please .

alaa-shubbak commented 1 year ago

here are all packages of open mmlab which have been installed :

image

i am confused, as the 'import mmselfsup 'gives a correct results in normal python , while it failed when check the environment ?!!!

fangyixiao18 commented 1 year ago

can u provide your whole command to run on down streaming tasks ?

alaa-shubbak commented 1 year ago

sure , my downstream task is for pose estimation not for object detection or segmentation.

I create a new directory for benchmarks/train ,and for configs/benchmark/mmpose.

  1. my dist/training file contains the following:
#!/usr/bin/env bash

set -x

CFG=$1
PRETRAIN=$2  # pretrained model
GPUS=$3
PY_ARGS=${@:4}

 set work_dir according to config path and pretrained model to distinguish different models
WORK_DIR="$(echo ${CFG%.*} | sed -e "s/configs/work_dirs/g")/$(echo $PRETRAIN | rev | cut -d/ -f 1 | rev)"

PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
mim train mmpose $CFG \
    --launcher pytorch -G $GPUS \
    --work-dir $WORK_DIR \
    --cfg-options model.backbone.init_cfg.type=Pretrained \
    model.backbone.init_cfg.checkpoint=$PRETRAIN \
    #model.roi_head.shared_head.init_cfg.type=Pretrained \
    #model.roi_head.shared_head.init_cfg.checkpoint=$PRETRAIN \
    $PY_ARGS
  1. my config file inherited from original mmpose , and i use only script redirect me to my old training of mmpose like this _base_ = '../../../../../../home/shubbak/old_mmLib/mmpose/configs/excavator/hrnet_w32_animalpose_exc_256x256_ACID.py'

I run this command: bash tools/benchmarks/mmpose/mim_dist_train.sh configs/benchmarks/mmpose/hrnet_w32_animalpose_exc_256x256_ACID_self_test.py checkpoints/simclr_resnet50_8xb32-coslr-200e_in1k_20220825-15f807a4.pth 1