Skip to content

Commit

Permalink
Merge branch 'tensorflow-upgrade'
Browse files Browse the repository at this point in the history
  • Loading branch information
smistad committed Dec 3, 2020
2 parents 71d3bc1 + 8afbc18 commit 5b88fcc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
8 changes: 4 additions & 4 deletions source/FAST/Algorithms/NeuralNetwork/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fast_add_sources(
TensorToSegmentation.hpp
BoundingBoxNetwork.cpp
BoundingBoxNetwork.hpp
DisplacementNetwork.cpp
DisplacementNetwork.hpp
FlowNetwork.cpp
FlowNetwork.hpp
)
fast_add_python_interfaces(InferenceEngine.hpp InferenceEngineManager.hpp)
fast_add_python_shared_pointers(InferenceEngine)
Expand All @@ -23,8 +23,8 @@ fast_add_process_object(ImageClassificationNetwork ImageClassificationNetwork.hp
fast_add_process_object(ClassificationToText ImageClassificationNetwork.hpp)
fast_add_process_object(SegmentationNetwork SegmentationNetwork.hpp)
fast_add_process_object(BoundingBoxNetwork BoundingBoxNetwork.hpp)
fast_add_process_object(DisplacementNetwork DisplacementNetwork.hpp)
fast_add_process_object(ImagesToSequence DisplacementNetwork.hpp)
fast_add_process_object(FlowNetwork FlowNetwork.hpp)
fast_add_process_object(ImagesToSequence FlowNetwork.hpp)
fast_add_process_object(TensorToSegmentation TensorToSegmentation.hpp)

if(FAST_MODULE_Visualization)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "DisplacementNetwork.hpp"
#include "FlowNetwork.hpp"
#include <FAST/Data/Image.hpp>

namespace fast {

DisplacementNetwork::DisplacementNetwork() {
FlowNetwork::FlowNetwork() {
createInputPort<Sequence>(0);
createOutputPort<Image>(0);
}

void DisplacementNetwork::execute() {
void FlowNetwork::execute() {
// Prepare input node: Should be two images in a sequence
run();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ namespace fast {

class Image;

/**
* This process object converts a stream of images to a stream of sequences of a given size.
* If the sequence size is X, for the first execute, the added item will be copied X times in the sequence.
* New images are added to the end/back of the sequence, while the first/oldest image, is removed.
*/
class FAST_EXPORT ImagesToSequence : public ProcessObject {
FAST_OBJECT(ImagesToSequence)
public:
void setSequenceSize(int size);
void loadAttributes();
void loadAttributes() override;
protected:
ImagesToSequence();
void execute() override;
Expand All @@ -22,15 +27,15 @@ class FAST_EXPORT ImagesToSequence : public ProcessObject {

/**
* A neural network which takes a sequence of images as input, and then
* outputs a displacement vector field. This can be a flow network which
* outputs a flow/displacement vector field. This can be a flow network which
* estimates the motion between two frames.
*/
class FAST_EXPORT DisplacementNetwork : public NeuralNetwork {
FAST_OBJECT(DisplacementNetwork)
class FAST_EXPORT FlowNetwork : public NeuralNetwork {
FAST_OBJECT(FlowNetwork)
public:
protected:
void execute() override;
DisplacementNetwork();
FlowNetwork();
};

}

0 comments on commit 5b88fcc

Please sign in to comment.