Skip to content

Commit d0fa86a

Browse files
committed
first commit
1 parent 11e4a69 commit d0fa86a

27 files changed

+11000
-0
lines changed

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Discriminative Localization with Image-Level Label
2+
Pytorch implementation of "Learning Deep Features for Discriminative Localization"
3+
4+
B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba
5+
Learning Deep Features for Discriminative Localization.
6+
Computer Vision and Pattern Recognition (CVPR), 2016.
7+
[[PDF](http://arxiv.org/pdf/1512.04150.pdf)][[Project Page](http://cnnlocalization.csail.mit.edu/)]
8+
9+
### Results of Action40 Dataset
10+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_0.jpg)
11+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_67.jpg)
12+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_270.jpg)
13+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_311.jpg)
14+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_315.jpg)
15+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_400.jpg)
16+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_552.jpg)
17+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_644.jpg)
18+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_760.jpg)
19+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_851.jpg)
20+
Object localization using only image-level annotation, without bounding box annotation.
21+
22+
# pytorch-CAM

README.md~

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Discriminative Localization with Image-Level Label
2+
Pytorch implementation of "Learning Deep Features for Discriminative Localization"
3+
4+
B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba
5+
Learning Deep Features for Discriminative Localization.
6+
Computer Vision and Pattern Recognition (CVPR), 2016.
7+
[[PDF](http://arxiv.org/pdf/1512.04150.pdf)][[Project Page](http://cnnlocalization.csail.mit.edu/)]
8+
9+
### Results of Action40 Dataset
10+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_0.jpg)
11+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_67.jpg)
12+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_270.jpg)
13+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_311.jpg)
14+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_315.jpg)
15+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_400.jpg)
16+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_552.jpg)
17+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_644.jpg)
18+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_760.jpg)
19+
![alt tag](https://github.com/gmayday1997/pytorch-CAM/blob/master/results/cam_851.jpg)
20+
Object localization using only image-level annotation, without bounding box annotation.
21+
22+
# pytorch-CAM

action40_config.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import os
2+
3+
class config():
4+
def __init__(self):
5+
6+
self.py_dir = os.getcwd()
7+
self.data_dir = os.path.join(self.py_dir,'data')
8+
self.save_ckpt_dir = os.path.join(self.py_dir,'ckpt')
9+
self.class_info_dir = os.path.join(self.data_dir,'class.json')
10+
self.best_ckpt_dir = os.path.join(self.save_ckpt_dir,'model_best.pth')
11+
self.height = 224
12+
self.width = 224
13+
self.init_random_fc8 = True
14+
self.learning_rate = 1e-5
15+
self.max_iter_number = 100000
16+
self.validate_iter_number = 500
17+
self.save_ckpoints_iter_number = 10000
18+
self.weight_decay = 5e-5
19+
self.momentum = 0.99
20+
self.train = False
21+
if self.train:
22+
self.batch_size = 8
23+
else:
24+
self.batch_size = 1

data/class.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"0": "applauding",
3+
"1": "blowing_bubbles",
4+
"2": "brushing_teeth",
5+
"3": "cleaning_the_floor",
6+
"4": "climbing",
7+
"5": "cooking",
8+
"6": "cutting_trees",
9+
"7": "cutting_vegetables",
10+
"8": "drinking",
11+
"9": "feeding_a_horse",
12+
"10": "fishing",
13+
"11": "fixing_a_bike",
14+
"12": "fixing_a_car",
15+
"13": "gardening",
16+
"14": "holding_an_umbrella",
17+
"15": "jumping",
18+
"16": "looking_through_a_microscope",
19+
"17": "looking_through_a_telescope",
20+
"18": "playing_guitar",
21+
"19": "playing_violin",
22+
"20": "pouring_liquid",
23+
"21": "pushing_a_cart",
24+
"22": "reading",
25+
"23": "phoning",
26+
"24": "riding_a_bike",
27+
"25": "riding_a_horse",
28+
"26": "rowing_a_boat",
29+
"27": "running",
30+
"28": "shooting_an_arrow",
31+
"29": "smoking",
32+
"30": "taking_photos",
33+
"31": "texting_message",
34+
"32": "throwing_frisby",
35+
"33": "using_a_computer",
36+
"34": "walking_the_dog",
37+
"35": "washing_dishes",
38+
"36": "watching_TV",
39+
"37": "waving_hands",
40+
"38": "writing_on_a_board",
41+
"39": "writing_on_a_book"
42+
}

0 commit comments

Comments
 (0)