1.3.3: fixed bug in visrank (forgot unpacking dsetid)

pull/405/head
KaiyangZhou 2020-08-18 22:17:35 +01:00
parent 208dc3e9b8
commit fefa31dc3f
4 changed files with 5 additions and 5 deletions

View File

@ -33,6 +33,7 @@ You can find some research projects that are built on top of Torchreid `here <ht
What's new
------------
- [Aug 2020] ``1.3.3``: Fixed bug in ``visrank`` (caused by not unpacking ``dsetid``).
- [Aug 2020] ``1.3.2``: Added ``_junk_pids`` to ``grid`` and ``prid``. This avoids using mislabeled gallery images for training when setting ``combineall=True``.
- [Aug 2020] ``1.3.0``: (1) Added ``dsetid`` to the existing 3-tuple data source, resulting in ``(impath, pid, camid, dsetid)``. This variable denotes the dataset ID and is useful when combining multiple datasets for training (as a dataset indicator). E.g., when combining ``market1501`` and ``cuhk03``, the former will be assigned ``dsetid=0`` while the latter will be assigned ``dsetid=1``. (2) Added ``RandomDatasetSampler``. Analogous to ``RandomDomainSampler``, ``RandomDatasetSampler`` samples a certain number of images (``batch_size // num_datasets``) from each of specified datasets (the amount is determined by ``num_datasets``).
- [Aug 2020] ``1.2.6``: Added ``RandomDomainSampler`` (it samples ``num_cams`` cameras each with ``batch_size // num_cams`` images to form a mini-batch).

View File

@ -48,7 +48,6 @@ extensions = [
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx_markdown_tables',
#'recommonmark'
]
# Add any paths that contain templates here, relative to this directory.

View File

@ -2,7 +2,7 @@ from __future__ import print_function, absolute_import
from torchreid import data, optim, utils, engine, losses, models, metrics
__version__ = '1.3.2'
__version__ = '1.3.3'
__author__ = 'Kaiyang Zhou'
__homepage__ = 'https://kaiyangzhou.github.io/'
__description__ = 'Deep learning person re-identification in PyTorch'

View File

@ -28,7 +28,7 @@ def visualize_ranked_results(
Args:
distmat (numpy.ndarray): distance matrix of shape (num_query, num_gallery).
dataset (tuple): a 2-tuple containing (query, gallery), each of which contains
tuples of (img_path(s), pid, camid).
tuples of (img_path(s), pid, camid, dsetid).
data_type (str): "image" or "video".
width (int, optional): resized image width. Default is 128.
height (int, optional): resized image height. Default is 256.
@ -76,7 +76,7 @@ def visualize_ranked_results(
shutil.copy(src, dst)
for q_idx in range(num_q):
qimg_path, qpid, qcamid = query[q_idx]
qimg_path, qpid, qcamid = query[q_idx][:3]
qimg_path_name = qimg_path[0] if isinstance(
qimg_path, (tuple, list)
) else qimg_path
@ -107,7 +107,7 @@ def visualize_ranked_results(
rank_idx = 1
for g_idx in indices[q_idx, :]:
gimg_path, gpid, gcamid = gallery[g_idx]
gimg_path, gpid, gcamid = gallery[g_idx][:3]
invalid = (qpid == gpid) & (qcamid == gcamid)
if not invalid: