View Code? Open in Web Editor
NEW
This project forked from rebeccahisey/imageclassification
Extension for classifying webcam video images using tensorflow in 3D Slicer
CMake 3.17%
Python 95.85%
Dockerfile 0.99%
imageclassification's Introduction
- Download this repository
- Add extension to 3D Slicer
- Install Docker Community Edition
- Install tensorflow (optional)
- Build Retrain Container
- Open command prompt
- Build container using the following command:
- docker build -t retrainimage <Path to ImageClassification Directory>/Models/retrainContainer
- Collect training photos
- Open Collect_Training_Photos module in 3D Slicer
- Start Plus Config file
- Select existing model or create a new model
- Select image class or create new classes
- Keeping the object that you are trying to recognize in the image frame click Start Image Collection
- For best results introduce as much variety in orientation and background conditions as possible
- Click Stop Image Collection
- Retrain the network
- Click Retrain
- This may take up to 20min
- To visualize training:
- Open command prompt
- Execute the following command:
- tensorboard --logdir <Path to retrainContainer>/<Model_Name>/trained_model/retrain_logs
- Navigate in browser to <host_name>:6006
- Copy trained_model folder from retrainContainer directory to classifierContainer directory
- Build Classifier Container
- Open command prompt
- Build container using the following command:
- docker build -t classifierimage <Path to ImageClassification Directory>/Models/classifierContainer
- Run Classifier
- Open CNN_Image_Classifier module in 3D Slicer
- Select model
- Click Start
- Making changes to classifier container
- image must be rebuilt when files in classifierContainer folder are changed
- execute the following commands in a command prompt window
- docker container rm classifierContainer
- docker image ls
- docker image rm <ID of classifierimage>
- Repeat step 9 to rebuild
imageclassification's People
Contributors
Stargazers