fdjingyuan / deep-fashion-analysis-eccv2018 Goto Github PK
View Code? Open in Web Editor NEWCodes of ECCV 2018 workshop paper "Deep Fashion Analysis with Feature Map Upsampling and Landmark-driven Attention"
Codes of ECCV 2018 workshop paper "Deep Fashion Analysis with Feature Map Upsampling and Landmark-driven Attention"
Here are my results according to your code. I don't know what's wrong. Can you help me?
metrics/category_top1 0.720525
metrics/category_top3 0.9028
metrics/category_top5 0.954475
metrics/attr_top3_type_1_texture_recall 0.5024482109227872
metrics/attr_top3_type_2_fabric_recall 0.36956639860899804
metrics/attr_top3_type_3_shape_recall 0.5224275448156045
metrics/attr_top3_type_4_part_recall 0.40200577936426996
metrics/attr_top3_type_5_style_recall 0.26165764513085366
metrics/attr_top3_all_recall 0.22836656517041548
I'm unable to replicate the results on deepfashion data provided at - https://drive.google.com/open?id=0B7EVK8r0v71pQ2FuZ0k0QnhBQnc
Benchmark data: Category and attribute prediction Benchmark
The network converged to following values: -
metrics/category_top1 0.72595 │
metrics/category_top3 0.901 │
metrics/category_top5 0.95005 │
metrics/attr_top3_type_1_texture_recall 0.4141996233521657 │
metrics/attr_top3_type_2_fabric_recall 0.3235709628341665 │
metrics/attr_top3_type_3_shape_recall 0.4539603569454316 │
metrics/attr_top3_type_4_part_recall 0.34098249192588814 │
metrics/attr_top3_type_5_style_recall 0.2215821621890053 │
metrics/attr_top3_all_recall 0.170695035246651 │
metrics/attr_top5_type_1_texture_recall 0.5369491525423729 │
metrics/attr_top5_type_2_fabric_recall 0.42020756357313627 │
metrics/attr_top5_type_3_shape_recall 0.5480138987601674 │
metrics/attr_top5_type_4_part_recall 0.4377868434472208 │
metrics/attr_top5_type_5_style_recall 0.29036102696528776
Hello,
I have successfully created a small part of the code and modified existing codes which can do the prediction on an input image. Basically I have changed input sample in the networks.py -- forward function from:
vgg16_output = self.vgg16_extractor(sample['image'])
to
vgg16_output = self.vgg16_extractor(torch.from_numpy(sample.astype(np.float32)).reshape(1, 3, image_w, image_h).cuda())
where sample in this case is the numpy array of input image.
However, during the concatenation of landmarks map (lm_merge_map) from attention branch and convolution features (conv_feature) from conv4_3 layer I am getting this error:
RuntimeError: Sizes of tensors must match except in dimension 2. Got 60 and 28 (The offending index is 0)
where the dimensions of both tensors are:
conv_feature: torch.Size([1, 512, 60, 77]), lm_merge_map: torch.Size([1, 1, 28, 28])
and dimensions of input image is:
image_h: 622, image_w: 486 , channel_num: 3
I am attaching the screenshot as well. Any help will be greatly appreciated. Thank you so much in advance.
When I run train code ( python -m src.train --conf src.conf.whole
) I get this error.
@pbamotra, @xuanle22, @ZhuXiang-tuxing
Hi, I ran the code to confirm if the performance is reproduces properly.
Although I customized the metric functions to output the f1 scores together, but the result should be reproducible as it is. (I failed to reproduce the "style" result. I can't understand how the authors achieved 68.82 recall@3 in their paper. Is there any thicks exist not mentioned in their paper?)
I trained the model with the default parameters that the authors provided.
The recall@3/5 is measured when the model shows the best f1@1 score during the training.
The below is the result table.
Recall@3/5 | Category | Texture | Fabric | Shape | Part | Style | All |
---|---|---|---|---|---|---|---|
batch=32 / lr= 0.0001 | 91.18 / 95.82 | 56.85 / 66.34 | 43.35 / 53.66 | 57.99 / 66.49 | 43.26 / 53.21 | 32.54 / 40.87 | 57.41 / 65.77 |
batch=32 * 8 / lr= 0.0001 * 8 | 89.42 / 94.77 | 52.08 / 61.40 | 38.22 / 48.38 | 54.54 / 63.41 | 39.2 / 48.42 | 27.88 / 37.27 | 53.56 / 62.07 |
I found that when I trained the model with Multiple GPUs (8) with 8 times of learning rate, the performance degrades severely. Pleas make sure that you find the correct learning rate and batch size when training your model.
I attached the evaluation curve of 1-GPU (lr=0.0001, batch=32) vs. 8-GPU (lr=0.0001 x 8, batch=32 x 8)
The blue one is for the 1-GPU.
once training is finished, there is a 'models' folder and pkl file created, is this the fully trained model? and how to use it to run prediction?
here is my specs
Ubuntu 18.04.3 LTS
Cuda compilation tools, release 9.1, V9.1.85
Python 3.7.0
Hi, is there any pre-trained model?
Hi authors,
Can you please explain your implementation of loss for the attribute classification branch. I'm no able to comprehend the 2*1000 output layer and the use of cross entropy on that. That data is multi-label classification if I'm not wrong, how do you modify the cross entropy loss to use on multi-label data, it should've been Sigmoid+BCELoss if I'm following the online PyTorch tutorials correctly.
Thanks
I'm running your code on google colab.
when I execute the scripts to generate the CSV file, I got the warning:
[tcmalloc: large alloc 2392449024 bytes]
before the system crashed
which is probably due to memory allocation exceeding the colab limit of 20GB
do you have any suggestions to reduce the memory requirements of the create_info script
python -m src.create_info -> python -m scripts.create_info
Hi, I tried to rearrange files in the folder since they were giving issues with python -n src.train a--conf src.conf.lm.py After rearrangement and approriate code run, I got this error
(pytorch) l@l-Predator-G3-571:~/Deep-Fashion-Analysis-ECCV2018/src$ python -m train --conf lm
('override', 'MODEL_NAME', 'lm.pkl')
('override', 'LM_SELECT_VGG_CHANNEL', 512)
('override', 'WEIGHT_LOSS_LM_POS', 10)
('override', 'USE_NET', <class 'lm_networks.LandmarkExpNetwork'>)
('override', 'EVALUATOR', <class 'utils.LandmarkEvaluator'>)
('override', 'LM_SELECT_VGG_SIZE', 28)
('override', 'LEARNING_RATE_DECAY', 0.8)
('override', 'LM_SELECT_VGG', 'conv4_3')
('override', 'DATASET_PROC_METHOD_TRAIN', 'BBOXRESIZE')
('override', 'DATASET_PROC_METHOD_VAL', 'BBOXRESIZE')
('override', 'gaussian_R', 8)
('override', 'VAL_DIR', 'runs/lm/07-18 15:58:31')
('override', 'TRAIN_DIR', 'runs/lm/07-18 15:58:31')
('override', 'LM_BRANCH', <class 'lm_networks.LandmarkBranchUpsample'>)
Downloading: "https://download.pytorch.org/models/vgg16-397923af.pth" to /home/l/.cache/torch/checkpoints/vgg16-397923af.pth
100%|██████████| 553433881/553433881 [03:51<00:00, 2391934.54it/s]
Traceback (most recent call last):
File "/home/l/miniconda2/envs/pytorch/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/home/l/miniconda2/envs/pytorch/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/l/Deep-Fashion-Analysis-ECCV2018/src/train.py", line 41, in
for i, sample in enumerate(train_dataloader):
File "/home/l/miniconda2/envs/pytorch/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 193, in iter
return _DataLoaderIter(self)
File "/home/l/miniconda2/envs/pytorch/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 469, in init
w.start()
File "/home/l/miniconda2/envs/pytorch/lib/python2.7/multiprocessing/process.py", line 130, in start
self._popen = Popen(self)
File "/home/l/miniconda2/envs/pytorch/lib/python2.7/multiprocessing/forking.py", line 121, in init
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
My system has
*16GB DDR4 RAM.
*GTX 1060 Ti 6GB version
*i7
*Ubuntu 16.04 lts
*cuda 10 with cudnn
I don't know whether it is because of insufficient memory or because of bad memory management. I think later is the case since there was no error regarding the NN size that I kknow may arrive from CUDA insufficient memory. Let's see . Also I'm running this with python 2.7 so probably that could be an issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.