Skip to content

Commit 0572c25

Browse files
authored
Merge pull request #13 from medtune/stats_distribute
Enhance models training methods
2 parents 806681b + 62ec8ed commit 0572c25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1500
-2030
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ __pycache__/
88

99
# Distribution / packaging
1010
.Python
11+
env/
12+
research/
1113
build/
1214
develop-eggs/
1315
dist/
@@ -24,7 +26,7 @@ wheels/
2426
.installed.cfg
2527
*.egg
2628
MANIFEST
27-
29+
*pyc
2830
# PyInstaller
2931
# Usually these files are written by a python script from a template
3032
# before PyInstaller builds the exe, so as to inject date/other infos into it.

DenseNet/preprocessing/densenet_pre.py

+6-10
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
slim = tf.contrib.slim
88
#ImageNet RGB mean values (moyenne)0.485, 0.457,0.407
9-
_R_MEAN = 0.485
10-
_G_MEAN = 0.457
11-
_B_MEAN = 0.407
9+
_R_MEAN = 123.68/255
10+
_G_MEAN = 116.779/255
11+
_B_MEAN = 103.939/255
1212

1313
#ImageNet standard deviation (écart-type)0.229, 0.224, 0.225
14-
_R_STD = 0.229
15-
_G_STD = 0.224
16-
_B_STD = 0.225
14+
_R_STD = 58.393/255
15+
_G_STD = 57.12/255
16+
_B_STD = 57.375/255
1717

1818
_RESIZE_SIDE_MIN = 256
1919
_RESIZE_SIDE_MAX = 512
@@ -62,10 +62,6 @@ def _crop(image, offset_height, offset_width, crop_height, crop_width):
6262
tf.summary.image("rnd_cropped_image", tf.expand_dims(image,0))
6363
return tf.reshape(image, cropped_shape)
6464

65-
66-
67-
68-
6965
def _random_crop(image_list, crop_height, crop_width):
7066

7167
"""Crops the given list of images.

README.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
# Models-implementation
2-
This is an implementation of CNN's architectures using TensorFlow. The main goal of this project is to develop solutions for healthcare, based on machine learning & deep learning.
2+
This is an implementation of CNN's architectures using TensorFlow. The main goal of this project is to support the creation of machine learning & deep learning Pipelines .
3+
4+
[lien](./setup.py)
35

46
## Description
57
The repository is composed of:
68
- Scripts for launching training and evaluation: It includes the basic tf.Session() and tf.train.MonitoredSession with different hooks and scaffold for distributed training.
79
- Folder Densenet: Regroup image preprocessing functions, script for a slim-like implementation of Densenet
8-
- Folder utils: Convert data to Tfrecord format, analyse your data with statistics.py
10+
- Folder utils: Convert data to Tfrecord format, analyse your data depending on its nature
11+
12+
##Installation
13+
14+
First, install Tensorflow (Or/And tensorflow-gpu) in order to perform computation in cpu-only (In GPU)
15+
Then, in order to use "slim" package, which is developped under : [lien](https://www.github.com/tensorflow/models/research/slim),
16+
git clone the above repository. Copy the "research" folder and perform both setup.py :
17+
- under research folder
18+
- under slim folder (make sure you delete BUILD file before running setup.py)
19+
20+
As a last step, git clone Models-implementation repo :
21+
https://www.github.com/medtune/Models-implementation
22+
923

1024
## Usage example
1125

1226

1327
## Release History
14-

chest/eval_chest.py

-122
This file was deleted.

chest/inference_chest.py

-56
This file was deleted.

0 commit comments

Comments
 (0)