SHI-Labs / Self-Similarity-Grouping

Self-similarity Grouping: A Simple Unsupervised Cross Domain Adaptation Approach for Person Re-identification (ICCV 2019, Oral)
187 stars 43 forks source link

TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs #10

Closed geyutang closed 5 years ago

geyutang commented 5 years ago

Hi, I again got a problem when running the source_train.py

Files already downloaded and verified Market1501 dataset loaded subset | # ids | # images

train | 676 | 11744 val | 75 | 1192 trainval | 751 | 12936 query | 750 | 3368 gallery | 751 | 15913 Traceback (most recent call last): File "/home/node3/xxxxxx/SSG/source_train.py", line 311, in main(parser.parse_args()) File "/home/node3/xxxxxx/SSG/source_train.py", line 196, in main metric = DistanceMetric(algorithm=args.dist_metric) File "/home/node3/xxxxxx/SSG/reid/dist_metric.py", line 13, in init self.metric = get_metric(algorithm, *args, *kwargs) File "/home/node3/xxxxxx/SSG/reid/metric_learning/init.py", line 25, in get_metric return __factory[algorithm](args, **kwargs) TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs

Thanks for your kindly reply!

OasisYang commented 5 years ago

Sorry, I don't meet that problem. You can simply comment the lines related to metric and it will not affect the training step.

geyutang commented 5 years ago

OK,thanks!

---Original--- From: "Yang Fu"<notifications@github.com> Date: Fri, Sep 20, 2019 10:27 AM To: "OasisYang/SSG"<SSG@noreply.github.com>; Cc: "geyutang"<939718154@qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [OasisYang/SSG] TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs (#10)

Sorry, I don't meet that problem. You can simply comment the lines related to metric and it will not affect the training step.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

geyutang commented 5 years ago

The problem was caused by the metric-learn package is mismatch! Reset the version to metric-learn==0.3.0.

ShawnCheung123 commented 4 years ago

hello, i meet the same problem as you. But when I reset the metric-learn version to 0.3.0, another error occur. Cannot import name 'graph_lasso' fron 'skilearn_covariance'. But this error would not occur in version 0.5.0. I wonder if you have met this problem and how you solve it. Thanks a lot.