Skip to content

Commit

Permalink
fix the bug of reading images
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomengyc committed Aug 15, 2018
1 parent 5491d7c commit 8b59d00
Show file tree
Hide file tree
Showing 17 changed files with 6 additions and 5 deletions.
Binary file modified exper/my_optim.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion exper/train_frame.py
Expand Up @@ -40,7 +40,7 @@ def get_arguments():
parser = argparse.ArgumentParser(description='ACoL')
parser.add_argument("--root_dir", type=str, default=ROOT_DIR,
help='Root dir for the project')
parser.add_argument("--img_dir", type=str, default=IMG_DIR,
parser.add_argument("--img_dir", type=str, default='',
help='Directory of training images')
parser.add_argument("--train_list", type=str,
default=train_list)
Expand Down
Binary file modified models/__init__.pyc
Binary file not shown.
Binary file modified models/vgg/__init__.pyc
Binary file not shown.
Binary file modified models/vgg/vgg_v0.pyc
Binary file not shown.
Binary file modified models/vgg/vgg_v1.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions scripts/train_vgg_cub.sh
Expand Up @@ -6,12 +6,12 @@ cd ../exper/
THRESHOLD=0.6


CUDA_VISIBLE_DEVICES=0 python train_frame.py --arch=vgg_v1 --epoch=60 --lr=0.0001 --batch_size=20 --num_gpu=1 --dataset=cub \
CUDA_VISIBLE_DEVICES=0,1 python train_frame.py --arch=vgg_v1 --epoch=60 --lr=0.0001 --batch_size=20 --num_gpu=2 --dataset=cub \
--disp_interval=40 \
--num_classes=1000 \
--num_classes=200 \
--threshold=${THRESHOLD} \
--num_workers=6 \
--img_dir=../data/CUB_200_2011/images/ \
--train_list=../datalist/CUB/train_list.txt \
--img_dir=../data/CUB_200_2011/images \
--snapshot_dir=../snapshots/vgg_imagenet_v1/ \
--restore_from=/home/xiaolin/.torch/models/vgg16-397923af.pth \
Binary file modified utils/LoadData.pyc
Binary file not shown.
Binary file modified utils/Metrics.pyc
Binary file not shown.
Binary file modified utils/Restore.pyc
Binary file not shown.
Binary file modified utils/__init__.pyc
Binary file not shown.
Binary file modified utils/avgMeter.pyc
Binary file not shown.
3 changes: 2 additions & 1 deletion utils/mydataset.py
Expand Up @@ -33,7 +33,8 @@ def __len__(self):
return len(self.image_list)

def __getitem__(self, idx):
img_name = os.path.join(self.root_dir, self.image_list[idx])
#img_name = os.path.join(self.root_dir, self.image_list[idx])
img_name = self.image_list[idx]
image = Image.open(img_name).convert('RGB')

if self.transform is not None:
Expand Down
Binary file modified utils/mydataset.pyc
Binary file not shown.
Binary file modified utils/transforms/__init__.pyc
Binary file not shown.
Binary file modified utils/transforms/functional.pyc
Binary file not shown.
Binary file modified utils/transforms/transforms.pyc
Binary file not shown.

0 comments on commit 8b59d00

Please sign in to comment.