Comments (3)
Hi @liangqianqian123 ,
It is called a "mesh union" in the code. Specifically, see union_groups line in __pool_side
. This is defined in the Mesh_union class.
from meshcnn.
I want to know where is the change of edge feature, such as average operation of the edge features. Is it in the class MeshUnion "rebuild_features_average"?
`class MeshUnion:
def init(self, n, device=torch.device('cpu')):
self.__size = n
self.rebuild_features = self.rebuild_features_average
self.groups = torch.eye(n).to(device)
def union(self, source, target):
self.groups[target, :] += self.groups[source, :]
def remove_group(self, index):
return
def get_group(self, edge_key):
return self.groups[edge_key, :]
def get_occurrences(self):
return torch.sum(self.groups, 0)
def get_groups(self, tensor_mask):
self.groups = torch.clamp(self.groups, 0, 1)
return self.groups[tensor_mask, :]
def rebuild_features_average(self, features, mask, target_edges):
self.prepare_groups(features, mask)
fe = torch.matmul(features.squeeze(-1), self.groups)
occurrences = torch.sum(self.groups, 0).expand(fe.shape)
fe = fe / occurrences
padding_b = target_edges - fe.shape[1]
if padding_b > 0:
padding_b = ConstantPad2d((0, padding_b, 0, 0), 0)
fe = padding_b(fe)
return fe
def prepare_groups(self, features, mask):
tensor_mask = torch.from_numpy(mask)
#tensor to numpy
# a.numpy()
# numpy to tensor
# torch.from_numpy(a)
self.groups = torch.clamp(self.groups[tensor_mask, :], 0, 1).transpose_(1, 0)
padding_a = features.shape[1] - self.groups.shape[0]
if padding_a > 0:
padding_a = ConstantPad2d((0, 0, 0, padding_a), 0)
self.groups = padding_a(self.groups)`
from meshcnn.
Is it in the class MeshUnion "rebuild_features_average"?
yep!
from meshcnn.
Related Issues (20)
- IndexError: index out of range
- AssertionError
- What is the relationship between your meshes and original coseg meshes?
- Segmentation of objects with different characteristic
- assert no zero face area
- Does the class "Mesh" have an attribute about face?
- Undestanding .eseg file
- Proper TensorBoard Usage
- How to prepare data for a custom dataset?
- cannot install pytorch=1.2.0 HOT 1
- How to save a segmented (colored) mesh in .obj format?
- IndexError: index out of range
- Using my own obj files for training
- The problem when I run meshcnn classification HOT 1
- Problems with date preprocessing.
- help in figuring out how human_seg dataset was created
- Cannot load pre-trained weights
- Request for further documentation of code options on the meshcnn wiki for the Classification task
- Numpy error? HOT 2
- A small spelling mistake in the paper
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meshcnn.