-
Notifications
You must be signed in to change notification settings - Fork 47
Refactored model.py to support image and LiDAR detection models. #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@SakhinetiPraveena Looks good so far 👍 |
Hi @dpascualhe I have defined DetectionModel, ImageDetectionModel and LiDARDetectionModel classes and updated the PR. I have used DetectionDataset class in the code which is yet to be defined, so merging this will raise errors now. Once Dataset classes are ready we can proceed with merging this as well. And during inference I am using the return type
To make it more secure, instead of a dict I can define a NamedTuple like shown below and return
Do let me know if you think that this would be an overkill or any alternative way to return the results. |
Looking good 👍 It serves as a solid blueprint for adding the required functionality in the future. I'd keep it as a draft for now until the changes in the dataset side are ready. Regarding the return type, I think a list of dicts is reasonable. A named tuple might be good for internal processing but might be harder to handle externally (e.g. if a user wants to dump results to a JSON file directly). Again, good job 😄 . |
Thanks a lot for the feedback @dpascualhe . So while the other changes are getting ready, I can work on generating pip package and pushing to PyPi. Let me know if you have anything else in mind that I can take up instead. |
I've refactored the segmentation model classes by introducing a new base class, PerceptionModel, which SegmentationModel now inherits from. All functionalities common to both segmentation and detection models have been moved to PerceptionModel to promote code reuse and maintain a consistent structure across different perception tasks.